39
|
1 " Vim syntax file
|
|
2 " Maintainer: Nikolai Weibull <source@pcppopper.org>
|
|
3 " URL: http://www.pcppopper.org/
|
|
4 " Latest Revision: 2004-12-16
|
|
5 " arch-tag: 4f6ecb37-d10c-4eca-add0-77991559414a
|
|
6
|
|
7 if version < 600
|
|
8 syntax clear
|
|
9 elseif exists("b:current_syntax")
|
|
10 finish
|
|
11 endif
|
|
12
|
|
13 " Keywords
|
|
14 syn keyword netrcKeyword machine password nextgroup=netrcName skipwhite skipnl
|
|
15 syn keyword netrcKeyword login nextgroup=netrcName,netrcSpecial skipwhite skipnl
|
|
16 syn keyword netrcKeyword default
|
|
17 syn keyword netrcKeyword macdef nextgroup=netrcInit,netrcMacroName skipwhite skipnl
|
|
18 syn region netrcMacro contained start='.' end='^$'
|
|
19
|
|
20 " Names
|
|
21 syn match netrcName contained display '\S\+'
|
|
22 syn match netrcName contained display '"[^\\"]*\(\\.[^\\"]*\)*'
|
|
23 syn match netrcMacroName contained display '\S\+' nextgroup=netrcMacro skipwhite skipnl
|
|
24 syn match netrcMacroName contained display '"[^\\"]*\(\\.[^\\"]*\)*' nextgroup=netrcMacro skipwhite skipnl
|
|
25
|
|
26 " Special
|
|
27 syn keyword netrcSpecial contained anonymous
|
|
28 syn match netrcInit contained '\<init$' nextgroup=netrcMacro skipwhite skipnl
|
|
29
|
|
30 syn sync fromstart
|
|
31
|
|
32 " Define the default highlighting.
|
|
33 " For version 5.7 and earlier: only when not done already
|
|
34 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
35 if version >= 508 || !exists("did_netrc_syn_inits")
|
|
36 if version < 508
|
|
37 let did_netrc_syn_inits = 1
|
|
38 command -nargs=+ HiLink hi link <args>
|
|
39 else
|
|
40 command -nargs=+ HiLink hi def link <args>
|
|
41 endif
|
|
42
|
|
43 HiLink netrcKeyword Keyword
|
|
44 HiLink netrcMacro PreProc
|
|
45 HiLink netrcName String
|
|
46 HiLink netrcMacroName String
|
|
47 HiLink netrcSpecial Special
|
|
48 HiLink netrcInit Special
|
|
49
|
|
50 delcommand HiLink
|
|
51 endif
|
|
52
|
|
53 let b:current_syntax = "netrc"
|
|
54
|
|
55 " vim: set sts=2 sw=2:
|