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