0
|
1 " Vim syntax file
|
|
2 " Language: netrc(5) configuration file
|
|
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
|
|
4 " Latest Revision: 2006-04-19
|
|
5
|
|
6 if exists("b:current_syntax")
|
|
7 finish
|
|
8 endif
|
|
9
|
|
10 let s:cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
|
13 syn keyword netrcKeyword machine nextgroup=netrcMachine skipwhite skipnl
|
|
14 syn keyword netrcKeyword login nextgroup=netrcLogin,netrcSpecial
|
|
15 \ skipwhite skipnl
|
|
16 syn keyword netrcKeyword password nextgroup=netrcPassword skipwhite skipnl
|
|
17 syn keyword netrcKeyword default
|
|
18 syn keyword netrcKeyword macdef nextgroup=netrcInit,netrcMacroName
|
|
19 \ skipwhite skipnl
|
|
20 syn region netrcMacro contained start='.' end='^$'
|
|
21
|
|
22 syn match netrcMachine contained display '\S\+'
|
|
23 syn match netrcMachine contained display '"[^\\"]*\(\\.[^\\"]*\)*"'
|
|
24 syn match netrcLogin contained display '\S\+'
|
|
25 syn match netrcLogin contained display '"[^\\"]*\(\\.[^\\"]*\)*"'
|
|
26 syn match netrcPassword contained display '\S\+'
|
|
27 syn match netrcPassword contained display '"[^\\"]*\(\\.[^\\"]*\)*"'
|
|
28 syn match netrcMacroName contained display '\S\+' nextgroup=netrcMacro
|
|
29 \ skipwhite skipnl
|
|
30 syn match netrcMacroName contained display '"[^\\"]*\(\\.[^\\"]*\)*"'
|
|
31 \ nextgroup=netrcMacro skipwhite skipnl
|
|
32
|
|
33 syn keyword netrcSpecial contained anonymous
|
|
34 syn match netrcInit contained '\<init$' nextgroup=netrcMacro
|
|
35 \ skipwhite skipnl
|
|
36
|
|
37 syn sync fromstart
|
|
38
|
|
39 hi def link netrcKeyword Keyword
|
|
40 hi def link netrcMacro PreProc
|
|
41 hi def link netrcMachine Identifier
|
|
42 hi def link netrcLogin String
|
|
43 hi def link netrcPassword String
|
|
44 hi def link netrcMacroName String
|
|
45 hi def link netrcSpecial Special
|
|
46 hi def link netrcInit Special
|
|
47
|
|
48 let b:current_syntax = "netrc"
|
|
49
|
|
50 let &cpo = s:cpo_save
|
|
51 unlet s:cpo_save
|