Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Ensure NERDTreeFile syntax group is matched when using NERDTreeDirArrows #167

Open
wants to merge 2 commits into from

0 participants

@ghost

The syntax/nerdtree.vim file defines the NERDTreeFile group using regular expressions which assume a file line looks like it does without the new NERDTreeDirArrows feature enabled. My proposed change checks the value of g:NERDTreeDirArrows and adjusts the regular expression for the file group appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 28, 2012
  1. Make sure nested directories don't match the NERDTreeFile group when …

    Josh Petrie authored
    …NERDTreeDirArrows is enabled.
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 3 deletions.
  1. +9 −3 syntax/nerdtree.vim
View
12 syntax/nerdtree.vim
@@ -36,11 +36,17 @@ syn match NERDTreeLink #[^-| `].* -> # contains=NERDTreeBookmark,NERDTreeOpenabl
"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 NERDTreeCWD #^[</].*$#
+if exists("g:NERDTreeDirArrows") && g:NERDTreeDirArrows
+ syn match NERDTreeExecFile #[^▾▸ ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark
+ syn match NERDTreeFile #[^▾▸ ].*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
+else
+ 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
+endif
+
"highlighting for bookmarks
syn match NERDTreeBookmark # {.*}#hs=s+1
Something went wrong with that request. Please try again.