blob: afe3af1eed853350ab85ec9ad0aba8bc38ebb500 [file] [log] [blame]
Bram Moolenaar0dc065e2005-07-04 22:49:24 +00001" Vim syntax file
Bram Moolenaar214641f2017-03-05 17:04:09 +01002" Language: a2ps(1) configuration file
3" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
4" Latest Revision: 2006-04-19
Bram Moolenaar0dc065e2005-07-04 22:49:24 +00005
6if exists("b:current_syntax")
7 finish
8endif
9
10let s:cpo_save = &cpo
11set cpo&vim
12
13syn keyword a2psPreProc Include
14 \ nextgroup=a2psKeywordColon
15
16syn keyword a2psMacro UserOption
17 \ nextgroup=a2psKeywordColon
18
19syn keyword a2psKeyword LibraryPath AppendLibraryPath PrependLibraryPath
20 \ Options Medium Printer UnknownPrinter
21 \ DefaultPrinter OutputFirstLine
22 \ PageLabelFormat Delegation FileCommand
23 \ nextgroup=a2psKeywordColon
24
25syn match a2psKeywordColon contained display ':'
26
27syn keyword a2psKeyword Variable nextgroup=a2psVariableColon
28
29syn match a2psVariableColon contained display ':'
30 \ nextgroup=a2psVariable skipwhite
31
32syn match a2psVariable contained display '[^ \t:(){}]\+'
33 \ contains=a2psVarPrefix
34
35syn match a2psVarPrefix contained display
36 \ '\<\%(del\|pro\|ps\|pl\|toc\|user\|\)\ze\.'
37
38syn match a2psLineCont display '\\$'
39
40syn match a2psSubst display '$\%(-\=.\=\d\+\)\=\h\d\='
41syn match a2psSubst display '#[?!]\=\w\d\='
42syn match a2psSubst display '#{[^}]\+}'
43
44syn region a2psString display oneline start=+'+ end=+'+
45 \ contains=a2psSubst
46
47syn region a2psString display oneline start=+"+ end=+"+
48 \ contains=a2psSubst
49
50syn keyword a2psTodo contained TODO FIXME XXX NOTE
51
52syn region a2psComment display oneline start='^\s*#' end='$'
53 \ contains=a2psTodo,@Spell
54
55hi def link a2psTodo Todo
56hi def link a2psComment Comment
57hi def link a2psPreProc PreProc
58hi def link a2psMacro Macro
59hi def link a2psKeyword Keyword
60hi def link a2psKeywordColon Delimiter
61hi def link a2psVariableColon Delimiter
62hi def link a2psVariable Identifier
63hi def link a2psVarPrefix Type
64hi def link a2psLineCont Special
65hi def link a2psSubst PreProc
66hi def link a2psString String
67
68let b:current_syntax = "a2ps"
69
70let &cpo = s:cpo_save
71unlet s:cpo_save