7
|
1 " Vim syntax file
|
|
2 " Language: Vim .viminfo file
|
|
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
|
3312
|
4 " Last Change: 2012 Feb 03
|
7
|
5
|
344
|
6 " Quit when a (custom) syntax file was already loaded
|
|
7 if exists("b:current_syntax")
|
7
|
8 finish
|
|
9 endif
|
|
10
|
3312
|
11 let s:cpo_save = &cpo
|
|
12 set cpo&vim
|
|
13
|
7
|
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.
|
344
|
34 " Only used when an item doesn't have highlighting yet
|
|
35 hi def link viminfoComment Comment
|
|
36 hi def link viminfoError Error
|
|
37 hi def link viminfoStatement Statement
|
7
|
38
|
|
39 let b:current_syntax = "viminfo"
|
|
40
|
3312
|
41 let &cpo = s:cpo_save
|
|
42 unlet s:cpo_save
|
|
43
|
7
|
44 " vim: ts=8 sw=2
|