nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 17713ee2934c94dee52609d85dce34d379199451
parent 9bd34f9424772b4d05430f2c15d955bff9bcd725
Author: Phil Runninger <PhilRunninger@users.noreply.github.com>
Date:   Sun, 11 Jun 2017 23:56:34 -0400

Merge pull request #704 from lifecrisis/bookmarks-markers

FEATURE: The g:NERDTreeMarkBookmarks setting
Diffstat:
Mdoc/NERD_tree.txt | 17+++++++++++++----
Mlib/nerdtree/path.vim | 2+-
Mplugin/NERD_tree.vim | 1+
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt
@@ -638,11 +638,11 @@ NERD tree. These options should be set in your vimrc.
 
 |'NERDTreeBookmarksFile'|       Where the bookmarks are stored.
 
-|'NERDTreeBookmarksSort'|       Whether the bookmarks list is sorted on
-                                display.
+|'NERDTreeBookmarksSort'|       Control how the Bookmark table is sorted.
 
-|'NERDTreeMouseMode'|           Tells the NERD tree how to handle mouse
-                                clicks.
+|'NERDTreeMarkBookmarks'|       Render bookmarked nodes with markers.
+
+|'NERDTreeMouseMode'|           Manage the interpretation of mouse clicks.
 
 |'NERDTreeQuitOnOpen'|          Closes the tree window after opening a file.
 
@@ -847,6 +847,15 @@ If set to 1, the bookmarks list is sorted in a case-insensitive manner.
 If set to 2, the bookmarks list is sorted in a case-sensitive manner.
 
 ------------------------------------------------------------------------------
+                                                     *'NERDTreeMarkBookmarks'*
+Values: 0 or 1
+Default: 1
+
+If set to 1, Bookmarks will be specially marked whenever the NERDTree is
+rendered. Users of the |'NERDTreeMinimalUI'| setting may prefer to disable
+this setting for even less visual clutter.
+
+------------------------------------------------------------------------------
                                                        *'NERDTreeMouseMode'*
 Values: 1, 2 or 3.
 Default: 1.
diff --git a/lib/nerdtree/path.vim b/lib/nerdtree/path.vim
@@ -52,7 +52,7 @@ function! s:Path.cacheDisplayString() abort
             call add(self._bookmarkNames, i.name)
         endif
     endfor
-    if !empty(self._bookmarkNames)
+    if !empty(self._bookmarkNames) && g:NERDTreeMarkBookmarks == 1
         let self.cachedDisplayString .= ' {' . join(self._bookmarkNames) . '}'
     endif
 
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -57,6 +57,7 @@ call s:initVariable("g:NERDTreeBookmarksFile", expand('$HOME') . '/.NERDTreeBook
 call s:initVariable("g:NERDTreeBookmarksSort", 1)
 call s:initVariable("g:NERDTreeHighlightCursorline", 1)
 call s:initVariable("g:NERDTreeHijackNetrw", 1)
+call s:initVariable('g:NERDTreeMarkBookmarks', 1)
 call s:initVariable("g:NERDTreeMouseMode", 1)
 call s:initVariable("g:NERDTreeNotificationThreshold", 100)
 call s:initVariable("g:NERDTreeQuitOnOpen", 0)