2 " Language: po (gettext)
3 " Maintainer: Nam SungHyun <namsh@kldp.org>
4 " Last Change: 2001 Apr 26
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
10 elseif exists("b:current_syntax")
14 syn match poComment "^#.*$"
15 syn match poSources "^#:.*$"
16 syn match poStatement "^\(domain\|msgid\|msgstr\)"
17 syn match poSpecial contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
18 syn match poFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
19 syn match poFormat "%%" contained
20 syn region poString start=+"+ skip=+\\\\\|\\"+ end=+"+
21 \ contains=poSpecial,poFormat
23 " Define the default highlighting.
24 " For version 5.7 and earlier: only when not done already
25 " For version 5.8 and later: only when an item doesn't have highlighting yet
26 if version >= 508 || !exists("did_po_syn_inits")
28 let did_po_syn_inits = 1
29 command -nargs=+ HiLink hi link <args>
31 command -nargs=+ HiLink hi def link <args>
34 HiLink poComment Comment
35 HiLink poSources PreProc
36 HiLink poStatement Statement
37 HiLink poSpecial Special
38 HiLink poFormat poSpecial
39 HiLink poString String
44 let b:current_syntax = "po"
46 " vim:set ts=8 sts=2 sw=2 noet: