nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 5fd7441dbefa825797c7460c70b723b73c612fb0
parent a5f86e1a8fe9bdd5c621419f64975b37315a89d7
Author: Martin Grenfell <martin_grenfell@msn.com>
Date:   Fri,  6 Jun 2008 23:02:37 +1200

add highlighting for marks

Diffstat:
Mplugin/NERD_tree.vim | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -2239,11 +2239,14 @@ function! s:SetupSyntaxHighlighting()
     "highlighting for readonly files 
     syn match treeRO #[0-9a-zA-Z]\+.*\[RO\]# contains=treeFlag
 
+    "highlighting for marks
+    syn match treeMark # {.*}#hs=s+1
+
     "highlighing for directory nodes and file nodes 
     syn match treeDirSlash #/#
-    syn match treeDir #[^-| `].*/\([ {}]\{4\}\)*$# contains=treeLink,treeDirSlash,treeOpenable,treeClosable
-    syn match treeFile  #|-.*# contains=treeLink,treePart,treeRO,treePartFile
-    syn match treeFile  #`-.*# contains=treeLink,treePart,treeRO,treePartFile
+    syn match treeDir #[^-| `].*/# contains=treeLink,treeDirSlash,treeOpenable,treeClosable
+    syn match treeFile  #|-.*# contains=treeLink,treePart,treeRO,treePartFile,treeMark
+    syn match treeFile  #`-.*# contains=treeLink,treePart,treeRO,treePartFile,treeMark
     syn match treeCWD #^/.*$# 
 
     if g:NERDChristmasTree
@@ -2272,6 +2275,7 @@ function! s:SetupSyntaxHighlighting()
     hi def link treeOpenable Title
     hi def link treeFlag ignore
     hi def link treeRO WarningMsg
+    hi def link treeMark Statement
 
     hi def link NERDTreeCurrentNode Search
 endfunction
@@ -2310,6 +2314,9 @@ function! s:StripMarkupFromLine(line, removeLeadingSpaces)
     "strip off any read only flag 
     let line = substitute (line, s:tree_RO_str_reg, "","")
 
+    "strip off any mark flags
+    let line = substitute (line, ' {[^}*]}', "","")
+
     let wasdir = 0
     if line =~ '/$' 
         let wasdir = 1