neovim

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

dictconf.vim (3118B)


      1 " Vim syntax file
      2 " Language:             dict(1) configuration file
      3 " Previous Maintainer:  Nikolai Weibull <now@bitwi.se>
      4 " Latest Revision:      2006-04-19
      5 
      6 if exists("b:current_syntax")
      7  finish
      8 endif
      9 
     10 let s:cpo_save = &cpo
     11 set cpo&vim
     12 
     13 syn keyword dictconfTodo        contained TODO FIXME XXX NOTE
     14 
     15 syn region  dictconfComment     display oneline start='#' end='$'
     16                                \ contains=dictconfTodo,@Spell
     17 
     18 syn match   dictconfBegin       display '^'
     19                                \ nextgroup=dictconfKeyword,dictconfComment
     20                                \ skipwhite
     21 
     22 syn keyword dictconfKeyword     contained server
     23                                \ nextgroup=dictconfServer skipwhite
     24 
     25 syn keyword dictconfKeyword     contained pager
     26                                \ nextgroup=dictconfPager
     27 
     28 syn match   dictconfServer      contained display
     29                                \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
     30                                \ nextgroup=dictconfServerOptG skipwhite
     31 
     32 syn region  dictconfServer      contained display oneline
     33                                \ start=+"+ skip=+""+ end=+"+
     34                                \ nextgroup=dictconfServerOptG skipwhite
     35 
     36 syn region  dictconfServerOptG  contained transparent
     37                                \ matchgroup=dictconfServerOptsD start='{'
     38                                \ matchgroup=dictconfServerOptsD end='}'
     39                                \ contains=dictconfServerOpts,dictconfComment
     40 
     41 syn keyword dictconfServerOpts  contained port
     42                                \ nextgroup=dictconfNumber skipwhite
     43 
     44 syn keyword dictconfServerOpts  contained user
     45                                \ nextgroup=dictconfUsername skipwhite
     46 
     47 syn match   dictconfUsername    contained display
     48                                \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
     49                                \ nextgroup=dictconfSecret skipwhite
     50 syn region  dictconfUsername    contained display oneline
     51                                \ start=+"+ skip=+""+ end=+"+
     52                                \ nextgroup=dictconfSecret skipwhite
     53 
     54 syn match   dictconfSecret      contained display
     55                                \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
     56 syn region  dictconfSecret      contained display oneline
     57                                \ start=+"+ skip=+""+ end=+"+
     58 
     59 syn match   dictconfNumber      contained '\<\d\+\>'
     60 
     61 syn match   dictconfPager       contained display
     62                                \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
     63 syn region  dictconfPager       contained display oneline
     64                                \ start=+"+ skip=+""+ end=+"+
     65 
     66 hi def link dictconfTodo        Todo
     67 hi def link dictconfComment     Comment
     68 hi def link dictconfKeyword     Keyword
     69 hi def link dictconfServer      String
     70 hi def link dictconfServerOptsD Delimiter
     71 hi def link dictconfServerOpts  Identifier
     72 hi def link dictconfUsername    String
     73 hi def link dictconfSecret      Special
     74 hi def link dictconfNumber      Number
     75 hi def link dictconfPager       String
     76 
     77 let b:current_syntax = "dictconf"
     78 
     79 let &cpo = s:cpo_save
     80 unlet s:cpo_save