7
|
1 " Vim syntax file
|
|
2 " Language: Vim .viminfo file
|
|
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
|
|
4 " Last Change: 2001 Apr 25
|
|
5
|
|
6 " For version 5.x: Clear all syntax items
|
|
7 " For version 6.x: Quit when a syntax file was already loaded
|
|
8 if version < 600
|
|
9 syntax clear
|
|
10 elseif exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13
|
|
14 " The lines that are NOT recognized
|
|
15 syn match viminfoError "^[^\t].*"
|
|
16
|
|
17 " The one-character one-liners that are recognized
|
|
18 syn match viminfoStatement "^[/&$@:?=%!<]"
|
|
19
|
|
20 " The two-character one-liners that are recognized
|
|
21 syn match viminfoStatement "^[-'>"]."
|
|
22 syn match viminfoStatement +^"".+
|
|
23 syn match viminfoStatement "^\~[/&]"
|
|
24 syn match viminfoStatement "^\~[hH]"
|
|
25 syn match viminfoStatement "^\~[mM][sS][lL][eE]\d\+\~\=[/&]"
|
|
26
|
|
27 syn match viminfoOption "^\*.*=" contains=viminfoOptionName
|
|
28 syn match viminfoOptionName "\*\a*"ms=s+1 contained
|
|
29
|
|
30 " Comments
|
|
31 syn match viminfoComment "^#.*"
|
|
32
|
|
33 " Define the default highlighting.
|
|
34 " For version 5.7 and earlier: only when not done already
|
|
35 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
36 if version >= 508 || !exists("did_viminfo_syntax_inits")
|
|
37 if version < 508
|
|
38 let did_viminfo_syntax_inits = 1
|
|
39 command -nargs=+ HiLink hi link <args>
|
|
40 else
|
|
41 command -nargs=+ HiLink hi def link <args>
|
|
42 endif
|
|
43
|
|
44 HiLink viminfoComment Comment
|
|
45 HiLink viminfoError Error
|
|
46 HiLink viminfoStatement Statement
|
|
47
|
|
48 delcommand HiLink
|
|
49 endif
|
|
50
|
|
51 let b:current_syntax = "viminfo"
|
|
52
|
|
53 " vim: ts=8 sw=2
|