separate out syntax matching for Dir Arrows vs old style
This commit is contained in:
parent
55a8954c48
commit
9d9edd03d4
@ -7,17 +7,6 @@ syn match NERDTreeFlag #\[RO\]#
|
||||
"highlighting for the .. (up dir) line at the top of the tree
|
||||
execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line ."#"
|
||||
|
||||
"highlighting for the ~/+ symbols for the directory nodes
|
||||
syn match NERDTreeClosable #\~\<#
|
||||
syn match NERDTreeClosable #\~\.#
|
||||
syn match NERDTreeOpenable #+\<#
|
||||
syn match NERDTreeOpenable #+\.#he=e-1
|
||||
|
||||
"highlighting for the tree structural parts
|
||||
syn match NERDTreePart #|#
|
||||
syn match NERDTreePart #`#
|
||||
syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart
|
||||
|
||||
"quickhelp syntax elements
|
||||
syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#hs=s+2,he=e-1
|
||||
syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#hs=s+2,he=e-1
|
||||
@ -30,15 +19,40 @@ syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTr
|
||||
"highlighting for readonly files
|
||||
syn match NERDTreeRO #.*\[RO\]#hs=s+2 contains=NERDTreeFlag,NERDTreeBookmark,NERDTreePart,NERDTreePartFile
|
||||
|
||||
"highlighting for sym links
|
||||
syn match NERDTreeLink #[^-| `].* -> # contains=NERDTreeBookmark,NERDTreeOpenable,NERDTreeClosable,NERDTreeDirSlash
|
||||
|
||||
"highlighing for directory nodes and file nodes
|
||||
syn match NERDTreeDirSlash #/#
|
||||
syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeDirSlash,NERDTreeOpenable,NERDTreeClosable
|
||||
syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark
|
||||
syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
|
||||
syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
|
||||
syn match NERDTreeDirSlash #/# containedin=NERDTreeDir
|
||||
|
||||
if g:NERDTreeDirArrows
|
||||
syn match NERDTreeClosable #▾# containedin=NERDTreeDir,NERDTreeFile
|
||||
syn match NERDTreeOpenable #▸# containedin=NERDTreeDir,NERDTreeFile
|
||||
|
||||
syn match NERDTreeDir #[^▾▸ ].*/# contains=NERDTreeLink
|
||||
syn match NERDTreeExecFile #^ .*\*\($\| \)# contains=NERDTreeLink,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark
|
||||
syn match NERDTreeFile #^[^"\.▾▸] *[^▾▸]*# contains=NERDTreeLink,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
|
||||
|
||||
"highlighting for sym links
|
||||
syn match NERDTreeLink #^ *[^▾▸]* -> # contains=NERDTreeBookmark,NERDTreeOpenable,NERDTreeClosable,NERDTreeDirSlash
|
||||
else
|
||||
"highlighting for the ~/+ symbols for the directory nodes
|
||||
syn match NERDTreeClosable #\~\<#
|
||||
syn match NERDTreeClosable #\~\.#
|
||||
syn match NERDTreeOpenable #+\<#
|
||||
syn match NERDTreeOpenable #+\.#he=e-1
|
||||
|
||||
"highlighting for the tree structural parts
|
||||
syn match NERDTreePart #|#
|
||||
syn match NERDTreePart #`#
|
||||
syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart
|
||||
|
||||
syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeOpenable,NERDTreeClosable
|
||||
syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark
|
||||
syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
|
||||
syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
|
||||
|
||||
"highlighting for sym links
|
||||
syn match NERDTreeLink #[^-| `].* -> # contains=NERDTreeBookmark,NERDTreeOpenable,NERDTreeClosable,NERDTreeDirSlash
|
||||
endif
|
||||
|
||||
syn match NERDTreeCWD #^[</].*$#
|
||||
|
||||
"highlighting for bookmarks
|
||||
@ -53,15 +67,11 @@ syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBook
|
||||
if exists("g:NERDChristmasTree") && g:NERDChristmasTree
|
||||
hi def link NERDTreePart Special
|
||||
hi def link NERDTreePartFile Type
|
||||
hi def link NERDTreeFile Normal
|
||||
hi def link NERDTreeExecFile Title
|
||||
hi def link NERDTreeDirSlash Identifier
|
||||
hi def link NERDTreeClosable Type
|
||||
else
|
||||
hi def link NERDTreePart Normal
|
||||
hi def link NERDTreePartFile Normal
|
||||
hi def link NERDTreeFile Normal
|
||||
hi def link NERDTreeClosable Title
|
||||
endif
|
||||
|
||||
hi def link NERDTreeBookmarksHeader statement
|
||||
@ -78,9 +88,11 @@ hi def link NERDTreeToggleOff WarningMsg
|
||||
|
||||
hi def link NERDTreeDir Directory
|
||||
hi def link NERDTreeUp Directory
|
||||
hi def link NERDTreeFile Normal
|
||||
hi def link NERDTreeCWD Statement
|
||||
hi def link NERDTreeLink Macro
|
||||
hi def link NERDTreeOpenable Title
|
||||
hi def link NERDTreeClosable Title
|
||||
hi def link NERDTreeFlag ignore
|
||||
hi def link NERDTreeRO WarningMsg
|
||||
hi def link NERDTreeBookmark Statement
|
||||
|
Loading…
Reference in New Issue
Block a user