gemini.vim

[vim] Gemini text syntax highlighting vim plugin
git clone https://git.torresjrjr.com/gemini.vim.git
Log | Files | Refs | README | LICENSE

gemini.vim (1093B)


      1 " Vim syntax file
      2 " Language:    Gemini Text
      3 " Maintainer:  Byron Torres (@torresjrjr) <b@torresjrjr.com>
      4 " Last Change: 2020-11-12
      5 " Filenames:   *.{gemini,gmi}
      6 
      7 if exists("b:current_syntax")
      8 	finish
      9 endif
     10 
     11 " Matches
     12 syn match link_prefix    /^=>\s*/    nextgroup=link
     13 syn match link           /\S*/       nextgroup=link_comment contained
     14 syn match link_comment   /.*$/       contained
     15 
     16 syn match heading_prefix /^##\?#\?/  nextgroup=heading_text
     17 syn match heading_text   /.*$/       contained
     18 
     19 syn match pre_toggle     /^```.*/    contained
     20 
     21 syn match ul_prefix      /^* /
     22 syn match quote_prefix   /^>/
     23 
     24 " Regions
     25 syn region pre_block   start=/^```/ end=/^```/ fold contains=pre_toggle keepend
     26 
     27 " Highlighting
     28 let b:current_syntax = "gemini"
     29 
     30 hi def link  link_prefix    Special
     31 hi def link  link           Underlined
     32 hi def link  link_comment   Comment
     33 
     34 hi def link  pre_block      PreProc
     35 hi def link  pre_toggle     Comment
     36 
     37 hi def link  heading_prefix Special
     38 hi def link  heading_text   Constant
     39 
     40 hi def link  ul_prefix      Statement
     41 hi def link  quote_prefix   Comment
     42 
     43 " @torresjrjr