Merge branch 'hack/autopaste'
[vim-kana.git] / runtime / syntax / netrw.vim
blobe2baac8887bb6ae1ff700017c079d4044d6c3df7
1 " Language   : Netrw Remote-Directory Listing Syntax
2 " Maintainer : Charles E. Campbell, Jr.
3 " Last change: Nov 27, 2006
4 " Version    : 9
5 " ---------------------------------------------------------------------
7 " Syntax Clearing: {{{1
8 if version < 600
9  syntax clear
10 elseif exists("b:current_syntax")
11  finish
12 endif
14 " ---------------------------------------------------------------------
15 " Directory List Syntax Highlighting: {{{1
16 syn cluster NetrwGroup contains=netrwHide,netrwSortBy,netrwSortSeq,netrwQuickHelp,netrwVersion
18 syn match  netrwSpecial         "\%(\S\+ \)*\S\+[*|=]\ze\%(\s\{2,}\|$\)" contains=netrwClassify
19 syn match  netrwDir             "\.\{1,2}/"                     contains=netrwClassify
20 syn match  netrwDir             "\%(\S\+ \)*\S\+/"              contains=netrwClassify
21 syn match  netrwDir             "^\S*/"                         contains=netrwClassify
22 syn match  netrwSizeDate        "\<\d\+\s\d\{1,2}/\d\{1,2}/\d\{4}\s"    contains=netrwDateSep skipwhite nextgroup=netrwTime
23 syn match  netrwSymLink         "\%(\S\+ \)*\S\+@\ze\%(\s\{2,}\|$\)"  contains=netrwClassify
24 syn match  netrwExe             "\%(\S\+ \)*\S\+\*\ze\%(\s\{2,}\|$\)" contains=netrwClassify,netrwTreeIgnore
25 syn match  netrwTreeIgnore contained "^\%(| \)*"
27 syn match  netrwClassify        "[*=|@/]\ze\%(\s\{2,}\|$\)"     contained
28 syn match  netrwDateSep         "/"                             contained
29 syn match  netrwTime            "\d\{1,2}:\d\{2}:\d\{2}"        contained contains=netrwTimeSep
30 syn match  netrwTimeSep         ":"
32 syn match  netrwComment         '".*\%(\t\|$\)'                 contains=@NetrwGroup
33 syn match  netrwHide            '^"\s*\(Hid\|Show\)ing:'        skipwhite nextgroup=netrwHidePat
34 syn match  netrwSlash           "/"                             contained
35 syn match  netrwHidePat         "[^,]\+"                        contained skipwhite nextgroup=netrwHideSep
36 syn match  netrwHideSep         ","                             contained transparent skipwhite nextgroup=netrwHidePat
37 syn match  netrwSortBy          "Sorted by"                     contained transparent skipwhite nextgroup=netrwList
38 syn match  netrwSortSeq         "Sort sequence:"                contained transparent skipwhite nextgroup=netrwList
39 syn match  netrwList            ".*$"                           contained contains=netrwComma
40 syn match  netrwComma           ","                             contained
41 syn region netrwQuickHelp       matchgroup=Comment start="Quick Help:\s\+" end="$" contains=netrwHelpCmd keepend contained
42 syn match  netrwHelpCmd         "\S\ze:"                        contained skipwhite nextgroup=netrwCmdSep
43 syn match  netrwCmdSep          ":"                             contained nextgroup=netrwCmdNote
44 syn match  netrwCmdNote         ".\{-}\ze  "                    contained
45 syn match  netrwVersion         "(netrw.*)"                     contained
47 " ---------------------------------------------------------------------
48 " Highlighting Links: {{{1
49 if !exists("did_drchip_dbg_syntax")
50  let did_drchip_netrwlist_syntax= 1
51  hi link netrwClassify  Function
52  hi link netrwCmdSep    Delimiter
53  hi link netrwComment   Comment
54  hi link netrwDir       Directory
55  hi link netrwHelpCmd   Function
56  hi link netrwHidePat   Statement
57  hi link netrwList      Statement
58  hi link netrwVersion   Identifier
59  hi link netrwSymLink   Special
60  hi link netrwExe       PreProc
61  hi link netrwDateSep   Delimiter
63  hi link netrwTimeSep   netrwDateSep
64  hi link netrwComma     netrwComment
65  hi link netrwHide      netrwComment
66 endif
68 " Current Syntax: {{{1
69 let   b:current_syntax = "netrwlist"
70 " ---------------------------------------------------------------------
71 " vim: ts=8 fdm=marker