nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit a2b06bbac35ef2e6478486b85b6153f04658dcc1
parent 4f9e981a60ea1b2354200bf4fd252a0b59a486dc
Author: Martin Grenfell <martin.grenfell@gmail.com>
Date:   Thu, 26 Nov 2015 00:24:44 +0000

remove references to NERDTreeDirArrows

Closes #515

Diffstat:
MREADME.markdown | 1-
Mlib/nerdtree/ui.vim | 13+------------
Msyntax/nerdtree.vim | 50+++++++++++++-------------------------------------
3 files changed, 14 insertions(+), 50 deletions(-)
diff --git a/README.markdown b/README.markdown
@@ -116,6 +116,5 @@ See here: https://github.com/scrooloose/nerdtree/issues/433#issuecomment-9259069
 
 Use these variables in your vimrc. Note that below are default arrow symbols
 
-    let g:NERDTreeDirArrows = 1
     let g:NERDTreeDirArrowExpandable = '▸'
     let g:NERDTreeDirArrowCollapsible = '▾'
diff --git a/lib/nerdtree/ui.vim b/lib/nerdtree/ui.vim
@@ -158,13 +158,6 @@ function! s:UI.getPath(ln)
         return self.nerdtree.root.path
     endif
 
-    if !g:NERDTreeDirArrows
-        " in case called from outside the tree
-        if line !~# '^ *[|`'.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.' ]' || line =~# '^$'
-            return {}
-        endif
-    endif
-
     if line ==# s:UI.UpDirLine()
         return self.nerdtree.root.path.getParent()
     endif
@@ -311,11 +304,7 @@ endfunction
 
 "FUNCTION: s:UI.MarkupReg() {{{1
 function! s:UI.MarkupReg()
-    if g:NERDTreeDirArrows
-        return '^\(['.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.'] \| \+['.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.'] \| \+\)'
-    endif
-
-    return '^[ `|]*[\-+~]'
+    return '^\(['.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.'] \| \+['.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.'] \| \+\)'
 endfunction
 
 "FUNCTION: s:UI._renderBookmarks {{{1
diff --git a/syntax/nerdtree.vim b/syntax/nerdtree.vim
@@ -22,43 +22,19 @@ syn match NERDTreeLinkDir #.*/ ->#me=e-3 containedin=NERDTreeDir
 "highlighing for directory nodes and file nodes
 syn match NERDTreeDirSlash #/# containedin=NERDTreeDir
 
-if g:NERDTreeDirArrows
-    exec 'syn match NERDTreeClosable #'.escape(g:NERDTreeDirArrowCollapsible, '~').'# containedin=NERDTreeDir,NERDTreeFile'
-    exec 'syn match NERDTreeOpenable #'.escape(g:NERDTreeDirArrowExpandable, '~').'# containedin=NERDTreeDir,NERDTreeFile'
-
-    let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~').escape(g:NERDTreeDirArrowExpandable, '~')
-    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'
-
-    "highlighting for readonly files
-    syn match NERDTreeRO # *\zs.*\ze \[RO\]# contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreeFile
-
-    syn match NERDTreeFlags #^ *\zs\[.\]# containedin=NERDTreeFile,NERDTreeExecFile
-    syn match NERDTreeFlags #\[.\]# containedin=NERDTreeDir
-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,NERDTreePartFile,NERDTreeBookmark
-    syn match NERDTreeFile  #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
-    syn match NERDTreeFile  #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
-
-    "highlighting for readonly files
-    syn match NERDTreeRO #|-.*\[RO\]#he=e-5 contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreePart,NERDTreePartFile
-
-    syn match NERDTreeFlags #-\[.\]# containedin=NERDTreeFile,NERDTreePartFile
-    syn match NERDTreeFlags #[+~]\zs\[.\]# containedin=NERDTreeDir
-endif
+exec 'syn match NERDTreeClosable #'.escape(g:NERDTreeDirArrowCollapsible, '~').'# containedin=NERDTreeDir,NERDTreeFile'
+exec 'syn match NERDTreeOpenable #'.escape(g:NERDTreeDirArrowExpandable, '~').'# containedin=NERDTreeDir,NERDTreeFile'
+
+let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~').escape(g:NERDTreeDirArrowExpandable, '~')
+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'
+
+"highlighting for readonly files
+syn match NERDTreeRO # *\zs.*\ze \[RO\]# contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreeFile
+
+syn match NERDTreeFlags #^ *\zs\[.\]# containedin=NERDTreeFile,NERDTreeExecFile
+syn match NERDTreeFlags #\[.\]# containedin=NERDTreeDir
 
 syn match NERDTreeCWD #^[</].*$#