829
|
1 " Language : Netrw Remote-Directory Listing Syntax
|
|
2 " Maintainer : Charles E. Campbell, Jr.
|
2034
|
3 " Last change: Jan 14, 2009
|
|
4 " Version : 16
|
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
|
2034
|
19 syn match netrwPlain "\(\S\+ \)*\S\+" contains=@NoSpell
|
|
20 syn match netrwSpecial "\%(\S\+ \)*\S\+[*|=]\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
|
|
21 syn match netrwDir "\.\{1,2}/" contains=netrwClassify,@NoSpell
|
|
22 syn match netrwDir "\%(\S\+ \)*\S\+/" contains=netrwClassify,@NoSpell
|
|
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
|
2034
|
26 syn match netrwTreeBar "^\%([-+|] \)\+" contains=netrwTreeBarSpace nextgroup=@netrwTreeGroup
|
|
27 syn match netrwTreeBarSpace " " contained
|
829
|
28
|
2034
|
29 syn match netrwClassify "[*=|@/]\ze\%(\s\{2,}\|$\)" contained
|
|
30 syn match netrwDateSep "/" contained
|
|
31 syn match netrwTime "\d\{1,2}:\d\{2}:\d\{2}" contained contains=netrwTimeSep
|
1121
|
32 syn match netrwTimeSep ":"
|
829
|
33
|
2034
|
34 syn match netrwComment '".*\%(\t\|$\)' contains=@NetrwGroup,@NoSpell
|
|
35 syn match netrwHide '^"\s*\(Hid\|Show\)ing:' skipwhite contains=@NoSpell nextgroup=netrwHidePat
|
829
|
36 syn match netrwSlash "/" contained
|
2034
|
37 syn match netrwHidePat "[^,]\+" contained skipwhite contains=@NoSpell nextgroup=netrwHideSep
|
|
38 syn match netrwHideSep "," contained skipwhite nextgroup=netrwHidePat
|
|
39 syn match netrwSortBy "Sorted by" contained transparent skipwhite nextgroup=netrwList
|
|
40 syn match netrwSortSeq "Sort sequence:" contained transparent skipwhite nextgroup=netrwList
|
|
41 syn match netrwCopyTgt "Copy/Move Tgt:" contained transparent skipwhite nextgroup=netrwList
|
|
42 syn match netrwList ".*$" contained contains=netrwComma,@NoSpell
|
829
|
43 syn match netrwComma "," contained
|
2034
|
44 syn region netrwQuickHelp matchgroup=Comment start="Quick Help:\s\+" end="$" contains=netrwHelpCmd,@NoSpell keepend contained
|
|
45 syn match netrwHelpCmd "\S\ze:" contained skipwhite contains=@NoSpell nextgroup=netrwCmdSep
|
829
|
46 syn match netrwCmdSep ":" contained nextgroup=netrwCmdNote
|
2034
|
47 syn match netrwCmdNote ".\{-}\ze " contained contains=@NoSpell
|
|
48 syn match netrwVersion "(netrw.*)" contained contains=@NoSpell
|
829
|
49
|
1619
|
50 " -----------------------------
|
|
51 " Special filetype highlighting {{{1
|
|
52 " -----------------------------
|
|
53 if exists("g:netrw_special_syntax") && netrw_special_syntax
|
2034
|
54 syn match netrwBak "\(\S\+ \)*\S\+\.bak\>" contains=netrwTreeBar,@NoSpell
|
|
55 syn match netrwCompress "\(\S\+ \)*\S\+\.\%(gz\|bz2\|Z\|zip\)\>" contains=netrwTreeBar,@NoSpell
|
|
56 if has("unix")
|
|
57 syn match netrwCoreDump "\<core\%(\.\d\+\)\=\>" contains=netrwTreeBar,@NoSpell
|
|
58 endif
|
|
59 syn match netrwData "\(\S\+ \)*\S\+\.dat\>" contains=netrwTreeBar,@NoSpell
|
|
60 syn match netrwHdr "\(\S\+ \)*\S\+\.h\>" contains=netrwTreeBar,@NoSpell
|
|
61 syn match netrwLib "\(\S\+ \)*\S*\.\%(a\|so\|lib\|dll\)\>" contains=netrwTreeBar,@NoSpell
|
|
62 syn match netrwMakeFile "\<[mM]akefile\>\|\(\S\+ \)*\S\+\.mak\>" contains=netrwTreeBar,@NoSpell
|
|
63 syn match netrwObj "\(\S\+ \)*\S*\.\%(o\|obj\)\>" contains=netrwTreeBar,@NoSpell
|
|
64 syn match netrwTags "\<tags\>" contains=netrwTreeBar,@NoSpell
|
|
65 syn match netrwTags "\<\(ANmenu\|ANtags\)\>" contains=netrwTreeBar,@NoSpell
|
3153
|
66 syn match netrwTilde "\(\S\+ \)*\S\+\~\*\=\>" contains=netrwTreeBar,@NoSpell
|
2034
|
67 syn match netrwTmp "\<tmp\(\S\+ \)*\S\+\>\|\(\S\+ \)*\S*tmp\>" contains=netrwTreeBar,@NoSpell
|
1619
|
68 endif
|
|
69
|
829
|
70 " ---------------------------------------------------------------------
|
|
71 " Highlighting Links: {{{1
|
1619
|
72 if !exists("did_drchip_netrwlist_syntax")
|
829
|
73 let did_drchip_netrwlist_syntax= 1
|
2034
|
74 hi default link netrwClassify Function
|
|
75 hi default link netrwCmdSep Delimiter
|
|
76 hi default link netrwComment Comment
|
|
77 hi default link netrwDir Directory
|
|
78 hi default link netrwHelpCmd Function
|
|
79 hi default link netrwHidePat Statement
|
|
80 hi default link netrwHideSep netrwComment
|
|
81 hi default link netrwList Statement
|
|
82 hi default link netrwVersion Identifier
|
|
83 hi default link netrwSymLink Question
|
|
84 hi default link netrwExe PreProc
|
|
85 hi default link netrwDateSep Delimiter
|
829
|
86
|
2034
|
87 hi default link netrwTreeBar Special
|
|
88 hi default link netrwTimeSep netrwDateSep
|
|
89 hi default link netrwComma netrwComment
|
|
90 hi default link netrwHide netrwComment
|
2908
|
91 hi default link netrwMarkFile TabLineSel
|
1619
|
92
|
|
93 " special syntax highlighting (see :he g:netrw_special_syntax)
|
2034
|
94 hi default link netrwBak NonText
|
|
95 hi default link netrwCompress Folded
|
|
96 hi default link netrwCoreDump WarningMsg
|
|
97 hi default link netrwData DiffChange
|
|
98 hi default link netrwLib DiffChange
|
|
99 hi default link netrwMakefile DiffChange
|
|
100 hi default link netrwObj Folded
|
|
101 hi default link netrwTilde Folded
|
|
102 hi default link netrwTmp Folded
|
|
103 hi default link netrwTags Folded
|
829
|
104 endif
|
|
105
|
|
106 " Current Syntax: {{{1
|
|
107 let b:current_syntax = "netrwlist"
|
|
108 " ---------------------------------------------------------------------
|
|
109 " vim: ts=8 fdm=marker
|