2011-06-18 11:56:31 -04:00
|
|
|
let s:tree_up_dir_line = '.. (up a dir)'
|
2014-07-10 18:35:42 -04:00
|
|
|
syn match NERDTreeIgnore #\~#
|
2016-02-26 20:57:40 -05:00
|
|
|
exec 'syn match NERDTreeIgnore #\['.g:NERDTreeGlyphReadOnly.'\]#'
|
2011-06-18 11:56:31 -04:00
|
|
|
|
|
|
|
"highlighting for the .. (up dir) line at the top of the tree
|
|
|
|
execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line ."#"
|
|
|
|
|
|
|
|
"quickhelp syntax elements
|
2014-06-29 13:40:11 -04:00
|
|
|
syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#ms=s+2,me=e-1
|
|
|
|
syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#ms=s+2,me=e-1
|
2017-07-29 09:40:11 -04:00
|
|
|
syn match NERDTreeHelpTitle #" .*\~$#ms=s+2,me=e-1
|
2014-06-29 13:40:11 -04:00
|
|
|
syn match NERDTreeToggleOn #(on)#ms=s+1,he=e-1
|
2014-06-29 16:44:40 -04:00
|
|
|
syn match NERDTreeToggleOff #(off)#ms=e-3,me=e-1
|
2011-06-18 11:56:31 -04:00
|
|
|
syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3
|
2014-07-10 18:35:42 -04:00
|
|
|
syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeIgnore,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand
|
2011-06-18 11:56:31 -04:00
|
|
|
|
|
|
|
"highlighting for sym links
|
2014-06-29 11:14:51 -04:00
|
|
|
syn match NERDTreeLinkTarget #->.*# containedin=NERDTreeDir,NERDTreeFile
|
|
|
|
syn match NERDTreeLinkFile #.* ->#me=e-3 containedin=NERDTreeFile
|
|
|
|
syn match NERDTreeLinkDir #.*/ ->#me=e-3 containedin=NERDTreeDir
|
2011-06-18 11:56:31 -04:00
|
|
|
|
|
|
|
"highlighing for directory nodes and file nodes
|
2014-06-29 13:17:19 -04:00
|
|
|
syn match NERDTreeDirSlash #/# containedin=NERDTreeDir
|
|
|
|
|
2017-07-29 09:40:11 -04:00
|
|
|
exec 'syn match NERDTreeClosable #' . escape(g:NERDTreeDirArrowCollapsible, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile'
|
|
|
|
exec 'syn match NERDTreeOpenable #' . escape(g:NERDTreeDirArrowExpandable, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile'
|
2014-06-29 13:17:19 -04:00
|
|
|
|
2016-02-06 18:11:52 -05:00
|
|
|
let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~]\-').escape(g:NERDTreeDirArrowExpandable, '~]\-')
|
2015-11-25 19:24:44 -05:00
|
|
|
exec 'syn match NERDTreeDir #[^'.s:dirArrows.' ].*/#'
|
|
|
|
syn match NERDTreeExecFile #^ .*\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmark
|
|
|
|
exec 'syn match NERDTreeFile #^[^"\.'.s:dirArrows.'] *[^'.s:dirArrows.']*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmark,NERDTreeExecFile'
|
2014-06-29 16:44:19 -04:00
|
|
|
|
2015-11-25 19:24:44 -05:00
|
|
|
"highlighting for readonly files
|
2016-02-26 20:57:40 -05:00
|
|
|
exec 'syn match NERDTreeRO # *\zs.*\ze \['.g:NERDTreeGlyphReadOnly.'\]# contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreeFile'
|
2014-07-10 18:35:42 -04:00
|
|
|
|
2015-11-25 19:24:44 -05:00
|
|
|
syn match NERDTreeFlags #^ *\zs\[.\]# containedin=NERDTreeFile,NERDTreeExecFile
|
|
|
|
syn match NERDTreeFlags #\[.\]# containedin=NERDTreeDir
|
2014-06-29 13:17:19 -04:00
|
|
|
|
2011-06-18 11:56:31 -04:00
|
|
|
syn match NERDTreeCWD #^[</].*$#
|
|
|
|
|
|
|
|
"highlighting for bookmarks
|
|
|
|
syn match NERDTreeBookmark # {.*}#hs=s+1
|
|
|
|
|
|
|
|
"highlighting for the bookmarks table
|
|
|
|
syn match NERDTreeBookmarksLeader #^>#
|
|
|
|
syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader
|
|
|
|
syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader
|
|
|
|
syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader
|
|
|
|
|
2014-06-29 14:53:57 -04:00
|
|
|
hi def link NERDTreePart Special
|
|
|
|
hi def link NERDTreePartFile Type
|
|
|
|
hi def link NERDTreeExecFile Title
|
|
|
|
hi def link NERDTreeDirSlash Identifier
|
2011-06-18 11:56:31 -04:00
|
|
|
|
|
|
|
hi def link NERDTreeBookmarksHeader statement
|
|
|
|
hi def link NERDTreeBookmarksLeader ignore
|
|
|
|
hi def link NERDTreeBookmarkName Identifier
|
|
|
|
hi def link NERDTreeBookmark normal
|
|
|
|
|
|
|
|
hi def link NERDTreeHelp String
|
|
|
|
hi def link NERDTreeHelpKey Identifier
|
|
|
|
hi def link NERDTreeHelpCommand Identifier
|
|
|
|
hi def link NERDTreeHelpTitle Macro
|
|
|
|
hi def link NERDTreeToggleOn Question
|
|
|
|
hi def link NERDTreeToggleOff WarningMsg
|
|
|
|
|
2014-06-29 11:14:51 -04:00
|
|
|
hi def link NERDTreeLinkTarget Type
|
|
|
|
hi def link NERDTreeLinkFile Macro
|
|
|
|
hi def link NERDTreeLinkDir Macro
|
|
|
|
|
2011-06-18 11:56:31 -04:00
|
|
|
hi def link NERDTreeDir Directory
|
|
|
|
hi def link NERDTreeUp Directory
|
2014-06-29 13:17:19 -04:00
|
|
|
hi def link NERDTreeFile Normal
|
2011-06-18 11:56:31 -04:00
|
|
|
hi def link NERDTreeCWD Statement
|
2016-10-13 01:38:36 -04:00
|
|
|
hi def link NERDTreeOpenable Directory
|
|
|
|
hi def link NERDTreeClosable Directory
|
2014-07-10 18:35:42 -04:00
|
|
|
hi def link NERDTreeIgnore ignore
|
2011-06-18 11:56:31 -04:00
|
|
|
hi def link NERDTreeRO WarningMsg
|
|
|
|
hi def link NERDTreeBookmark Statement
|
2014-07-10 18:35:42 -04:00
|
|
|
hi def link NERDTreeFlags Number
|
2011-06-18 11:56:31 -04:00
|
|
|
|
|
|
|
hi def link NERDTreeCurrentNode Search
|