neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

ondir.vim (1054B)


      1 " Vim syntax file
      2 " Language:     ondir <https://github.com/alecthomas/ondir>
      3 " Maintainer:   Jon Parise <jon@indelible.org>
      4 
      5 if exists('b:current_syntax')
      6  finish
      7 endif
      8 
      9 let s:cpo_save = &cpoptions
     10 set cpoptions&vim
     11 
     12 syn case match
     13 
     14 syn match   ondirComment  "#.*" contains=@Spell
     15 syn keyword ondirKeyword  final contained skipwhite nextgroup=ondirKeyword
     16 syn keyword ondirKeyword  enter leave contained skipwhite nextgroup=ondirPath
     17 syn match   ondirPath     "[^:]\+" contained display
     18 syn match   ondirColon    ":" contained display
     19 
     20 syn include @ondirShell   syntax/sh.vim
     21 syn region  ondirContent  start="^\s\+" end="^\ze\S.*$" keepend contained contains=@ondirShell
     22 
     23 syn region  ondirSection  start="^\(final\|enter\|leave\)" end="^\ze\S.*$" fold contains=ondirKeyword,ondirPath,ondirColon,ondirContent
     24 
     25 hi def link ondirComment  Comment
     26 hi def link ondirKeyword  Keyword
     27 hi def link ondirPath     Special
     28 hi def link ondirColon    Operator
     29 
     30 let b:current_syntax = 'ondir'
     31 
     32 let &cpoptions = s:cpo_save
     33 unlet s:cpo_save
     34 
     35 " vim: et ts=4 sw=2 sts=2: