829
|
1 " Language : Netrw Remote-Directory Listing Syntax
|
6476
|
2 " Maintainer : Charles E. Campbell
|
|
3 " Last change: Oct 06, 2014
|
|
4 " Version : 19
|
829
|
5 " ---------------------------------------------------------------------
|
|
6
|
|
7 " Syntax Clearing: {{{1
|
|
8 if version < 600
|
|
9 syntax clear
|
|
10 elseif exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13
|
|
14 " ---------------------------------------------------------------------
|
|
15 " Directory List Syntax Highlighting: {{{1
|
1619
|
16 syn cluster NetrwGroup contains=netrwHide,netrwSortBy,netrwSortSeq,netrwQuickHelp,netrwVersion,netrwCopyTgt
|
|
17 syn cluster NetrwTreeGroup contains=netrwDir,netrwSymLink,netrwExe
|
829
|
18
|
6476
|
19 syn match netrwPlain "\(\S\+ \)*\S\+" contains=netrwLink,@NoSpell
|
2034
|
20 syn match netrwSpecial "\%(\S\+ \)*\S\+[*|=]\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
|
|
21 syn match netrwDir "\.\{1,2}/" contains=netrwClassify,@NoSpell
|
5618
|
22 syn match netrwDir "\%(\S\+ \)*\S\+/\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
|
2034
|
23 syn match netrwSizeDate "\<\d\+\s\d\{1,2}/\d\{1,2}/\d\{4}\s" skipwhite contains=netrwDateSep,@NoSpell nextgroup=netrwTime
|
|
24 syn match netrwSymLink "\%(\S\+ \)*\S\+@\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
|
3153
|
25 syn match netrwExe "\%(\S\+ \)*\S*[^~]\*\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
|
6476
|
26 if has("gui_running") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4')
|
5618
|
27 syn match netrwTreeBar "^\%([-+|│] \)\+" contains=netrwTreeBarSpace nextgroup=@netrwTreeGroup
|
6476
|
28 else
|
|
29 syn match netrwTreeBar "^\%([-+|] \)\+" contains=netrwTreeBarSpace nextgroup=@netrwTreeGroup
|
|
30 endif
|
2034
|
31 syn match netrwTreeBarSpace " " contained
|
829
|
32
|
2034
|
33 syn match netrwClassify "[*=|@/]\ze\%(\s\{2,}\|$\)" contained
|
|
34 syn match netrwDateSep "/" contained
|
|
35 syn match netrwTime "\d\{1,2}:\d\{2}:\d\{2}" contained contains=netrwTimeSep
|
1121
|
36 syn match netrwTimeSep ":"
|
829
|
37
|
2034
|
38 syn match netrwComment '".*\%(\t\|$\)' contains=@NetrwGroup,@NoSpell
|
|
39 syn match netrwHide '^"\s*\(Hid\|Show\)ing:' skipwhite contains=@NoSpell nextgroup=netrwHidePat
|
829
|
40 syn match netrwSlash "/" contained
|
2034
|
41 syn match netrwHidePat "[^,]\+" contained skipwhite contains=@NoSpell nextgroup=netrwHideSep
|
|
42 syn match netrwHideSep "," contained skipwhite nextgroup=netrwHidePat
|
|
43 syn match netrwSortBy "Sorted by" contained transparent skipwhite nextgroup=netrwList
|
|
44 syn match netrwSortSeq "Sort sequence:" contained transparent skipwhite nextgroup=netrwList
|
|
45 syn match netrwCopyTgt "Copy/Move Tgt:" contained transparent skipwhite nextgroup=netrwList
|
|
46 syn match netrwList ".*$" contained contains=netrwComma,@NoSpell
|
829
|
47 syn match netrwComma "," contained
|
5734
|
48 syn region netrwQuickHelp matchgroup=Comment start="Quick Help:\s\+" end="$" contains=netrwHelpCmd,netrwQHTopic,@NoSpell keepend contained
|
|
49 syn match netrwHelpCmd "\S\+\ze:" contained skipwhite contains=@NoSpell nextgroup=netrwCmdSep
|
6476
|
50 syn match netrwQHTopic "([a-zA-Z &]\+)" contained skipwhite
|
829
|
51 syn match netrwCmdSep ":" contained nextgroup=netrwCmdNote
|
2034
|
52 syn match netrwCmdNote ".\{-}\ze " contained contains=@NoSpell
|
|
53 syn match netrwVersion "(netrw.*)" contained contains=@NoSpell
|
6476
|
54 syn match netrwLink "-->" contained skipwhite
|
829
|
55
|
1619
|
56 " -----------------------------
|
|
57 " Special filetype highlighting {{{1
|
|
58 " -----------------------------
|
|
59 if exists("g:netrw_special_syntax") && netrw_special_syntax
|
2034
|
60 syn match netrwBak "\(\S\+ \)*\S\+\.bak\>" contains=netrwTreeBar,@NoSpell
|
|
61 syn match netrwCompress "\(\S\+ \)*\S\+\.\%(gz\|bz2\|Z\|zip\)\>" contains=netrwTreeBar,@NoSpell
|
|
62 if has("unix")
|
|
63 syn match netrwCoreDump "\<core\%(\.\d\+\)\=\>" contains=netrwTreeBar,@NoSpell
|
|
64 endif
|
4339
|
65 syn match netrwLex "\(\S\+ \)*\S\+\.\%(l\|lex\)\>" contains=netrwTreeBar,@NoSpell
|
|
66 syn match netrwYacc "\(\S\+ \)*\S\+\.y\>" contains=netrwTreeBar,@NoSpell
|
2034
|
67 syn match netrwData "\(\S\+ \)*\S\+\.dat\>" contains=netrwTreeBar,@NoSpell
|
4339
|
68 syn match netrwDoc "\(\S\+ \)*\S\+\.\%(doc\|txt\|pdf\|ps\)" contains=netrwTreeBar,@NoSpell
|
|
69 syn match netrwHdr "\(\S\+ \)*\S\+\.\%(h\|hpp\)\>" contains=netrwTreeBar,@NoSpell
|
2034
|
70 syn match netrwLib "\(\S\+ \)*\S*\.\%(a\|so\|lib\|dll\)\>" contains=netrwTreeBar,@NoSpell
|
|
71 syn match netrwMakeFile "\<[mM]akefile\>\|\(\S\+ \)*\S\+\.mak\>" contains=netrwTreeBar,@NoSpell
|
|
72 syn match netrwObj "\(\S\+ \)*\S*\.\%(o\|obj\)\>" contains=netrwTreeBar,@NoSpell
|
4339
|
73 syn match netrwTags "\<\(ANmenu\|ANtags\)\>" contains=netrwTreeBar,@NoSpell
|
2034
|
74 syn match netrwTags "\<tags\>" contains=netrwTreeBar,@NoSpell
|
3153
|
75 syn match netrwTilde "\(\S\+ \)*\S\+\~\*\=\>" contains=netrwTreeBar,@NoSpell
|
2034
|
76 syn match netrwTmp "\<tmp\(\S\+ \)*\S\+\>\|\(\S\+ \)*\S*tmp\>" contains=netrwTreeBar,@NoSpell
|
1619
|
77 endif
|
|
78
|
829
|
79 " ---------------------------------------------------------------------
|
|
80 " Highlighting Links: {{{1
|
1619
|
81 if !exists("did_drchip_netrwlist_syntax")
|
829
|
82 let did_drchip_netrwlist_syntax= 1
|
2034
|
83 hi default link netrwClassify Function
|
|
84 hi default link netrwCmdSep Delimiter
|
|
85 hi default link netrwComment Comment
|
|
86 hi default link netrwDir Directory
|
|
87 hi default link netrwHelpCmd Function
|
5734
|
88 hi default link netrwQHTopic Number
|
2034
|
89 hi default link netrwHidePat Statement
|
|
90 hi default link netrwHideSep netrwComment
|
|
91 hi default link netrwList Statement
|
|
92 hi default link netrwVersion Identifier
|
|
93 hi default link netrwSymLink Question
|
|
94 hi default link netrwExe PreProc
|
|
95 hi default link netrwDateSep Delimiter
|
829
|
96
|
2034
|
97 hi default link netrwTreeBar Special
|
|
98 hi default link netrwTimeSep netrwDateSep
|
|
99 hi default link netrwComma netrwComment
|
|
100 hi default link netrwHide netrwComment
|
2908
|
101 hi default link netrwMarkFile TabLineSel
|
6476
|
102 hi default link netrwLink Special
|
1619
|
103
|
|
104 " special syntax highlighting (see :he g:netrw_special_syntax)
|
2034
|
105 hi default link netrwBak NonText
|
|
106 hi default link netrwCompress Folded
|
|
107 hi default link netrwCoreDump WarningMsg
|
|
108 hi default link netrwData DiffChange
|
4339
|
109 hi default link netrwHdr netrwPlain
|
|
110 hi default link netrwLex netrwPlain
|
2034
|
111 hi default link netrwLib DiffChange
|
|
112 hi default link netrwMakefile DiffChange
|
|
113 hi default link netrwObj Folded
|
|
114 hi default link netrwTilde Folded
|
|
115 hi default link netrwTmp Folded
|
|
116 hi default link netrwTags Folded
|
4339
|
117 hi default link netrwYacc netrwPlain
|
829
|
118 endif
|
|
119
|
|
120 " Current Syntax: {{{1
|
|
121 let b:current_syntax = "netrwlist"
|
|
122 " ---------------------------------------------------------------------
|
|
123 " vim: ts=8 fdm=marker
|