neovim

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

a2ps.vim (2426B)


      1 " Vim syntax file
      2 " Language:             a2ps(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 a2psPreProc       Include
     14                              \ nextgroup=a2psKeywordColon
     15 
     16 syn keyword a2psMacro         UserOption
     17                              \ nextgroup=a2psKeywordColon
     18 
     19 syn keyword a2psKeyword       LibraryPath AppendLibraryPath PrependLibraryPath
     20                              \ Options Medium Printer UnknownPrinter
     21                              \ DefaultPrinter OutputFirstLine
     22                              \ PageLabelFormat Delegation FileCommand
     23                              \ nextgroup=a2psKeywordColon
     24 
     25 syn match   a2psKeywordColon  contained display ':'
     26 
     27 syn keyword a2psKeyword       Variable nextgroup=a2psVariableColon
     28 
     29 syn match   a2psVariableColon contained display ':'
     30                              \ nextgroup=a2psVariable skipwhite
     31 
     32 syn match   a2psVariable      contained display '[^ \t:(){}]\+'
     33                              \ contains=a2psVarPrefix
     34 
     35 syn match   a2psVarPrefix     contained display
     36                              \ '\<\%(del\|pro\|ps\|pl\|toc\|user\|\)\ze\.'
     37 
     38 syn match   a2psLineCont      display '\\$'
     39 
     40 syn match   a2psSubst         display '$\%(-\=.\=\d\+\)\=\h\d\='
     41 syn match   a2psSubst         display '#[?!]\=\w\d\='
     42 syn match   a2psSubst         display '#{[^}]\+}'
     43 
     44 syn region  a2psString        display oneline start=+'+ end=+'+
     45                              \ contains=a2psSubst
     46 
     47 syn region  a2psString        display oneline start=+"+ end=+"+
     48                              \ contains=a2psSubst
     49 
     50 syn keyword a2psTodo          contained TODO FIXME XXX NOTE
     51 
     52 syn region  a2psComment       display oneline start='^\s*#' end='$'
     53                              \ contains=a2psTodo,@Spell
     54 
     55 hi def link a2psTodo          Todo
     56 hi def link a2psComment       Comment
     57 hi def link a2psPreProc       PreProc
     58 hi def link a2psMacro         Macro
     59 hi def link a2psKeyword       Keyword
     60 hi def link a2psKeywordColon  Delimiter
     61 hi def link a2psVariableColon Delimiter
     62 hi def link a2psVariable      Identifier
     63 hi def link a2psVarPrefix     Type
     64 hi def link a2psLineCont      Special
     65 hi def link a2psSubst         PreProc
     66 hi def link a2psString        String
     67 
     68 let b:current_syntax = "a2ps"
     69 
     70 let &cpo = s:cpo_save
     71 unlet s:cpo_save