mirror of
https://tildegit.org/sloum/gemini-vim-syntax.git
synced 2024-08-14 22:46:59 +00:00
Cleaning up comments and adding to readme
This commit is contained in:
parent
7b3ff39ca4
commit
071b71bf0c
2 changed files with 15 additions and 3 deletions
12
README.md
12
README.md
|
@ -1,6 +1,6 @@
|
||||||
# Gemini Vim Syntax
|
# Gemini Vim Syntax
|
||||||
|
|
||||||
This repo contains basic syntax highlighting for the [Gemini protocol](https://gemini.circumlunar.space/)'s *text/gemini* format.
|
This repo contains basic syntax highlighting for the [Gemini protocol](https://gemini.circumlunar.space/)'s **text/gemini** format.
|
||||||
|
|
||||||
## How to install
|
## How to install
|
||||||
|
|
||||||
|
@ -30,7 +30,15 @@ The current state of the syntax covers all items officially supported by the [ge
|
||||||
|
|
||||||
I plan to update the syntax when and if the spec adds more items to *text/gemini*.
|
I plan to update the syntax when and if the spec adds more items to *text/gemini*.
|
||||||
|
|
||||||
## Unexpected
|
|
||||||
|
## Filetype
|
||||||
|
|
||||||
|
This syntax is set up to be used with files labled with the **gmi** extension. For example:
|
||||||
|
```
|
||||||
|
$ vim my_gemini_map.gmi
|
||||||
|
```
|
||||||
|
|
||||||
|
## Surprises
|
||||||
|
|
||||||
It is possible that Windows users may find that the syntax does not work. I do not have a machine to test it on and would love some feedback. If it is not working it likely has to do with line endings. Windows uses \<cairrage-return\><\<line-feed\> and linux/unix use just \<line-feed\>. There are a number of ways to solve this problem ranging from just replacing the newlines manually to using software. In either case it shouldn't be too difficult.
|
It is possible that Windows users may find that the syntax does not work. I do not have a machine to test it on and would love some feedback. If it is not working it likely has to do with line endings. Windows uses \<cairrage-return\><\<line-feed\> and linux/unix use just \<line-feed\>. There are a number of ways to solve this problem ranging from just replacing the newlines manually to using software. In either case it shouldn't be too difficult.
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,13 @@ syn match gmiHeader /^#\{1,3}.*$/
|
||||||
syn match gmiLinkStart /^=>/ nextgroup=gmiLinkUrl skipwhite
|
syn match gmiLinkStart /^=>/ nextgroup=gmiLinkUrl skipwhite
|
||||||
|
|
||||||
" An extremely naive way of handling the URL portion of the link line
|
" An extremely naive way of handling the URL portion of the link line
|
||||||
" TODO think about improving this
|
" This is left naive in a deliberate attempt to be unambiguous about
|
||||||
|
" what part of a link line gemini considers to be the URL, regardless
|
||||||
|
" of whether or not it is a valid URL
|
||||||
syn match gmiLinkUrl /\S\+/ contained nextgroup=gmiLinkTitle skipwhite
|
syn match gmiLinkUrl /\S\+/ contained nextgroup=gmiLinkTitle skipwhite
|
||||||
|
|
||||||
|
" Skipping whitespace from the URL match all text, including whitespace,
|
||||||
|
" until the end of the line
|
||||||
syn match gmiLinkTitle /.*$/ contained
|
syn match gmiLinkTitle /.*$/ contained
|
||||||
|
|
||||||
" Handle list items
|
" Handle list items
|
||||||
|
|
Loading…
Reference in a new issue