diff --git a/doc/NERDTree.txt b/doc/NERDTree.txt index 161d71d8..2855d5c0 100644 --- a/doc/NERDTree.txt +++ b/doc/NERDTree.txt @@ -722,6 +722,9 @@ the NERDTree. These settings should be set in your vimrc, using `:let`. |NERDTreeShowLineNumbers| Tells the NERDTree whether to display line numbers in the tree window. +|NERDTreeShowSymlinkDest| Tells the NERDTree whether to display symlinks + destination path or display it as a normal node + |NERDTreeSortOrder| Tell the NERDTree how to sort the nodes in the tree. diff --git a/lib/nerdtree/path.vim b/lib/nerdtree/path.vim index 2165c57a..7b300c53 100644 --- a/lib/nerdtree/path.vim +++ b/lib/nerdtree/path.vim @@ -61,7 +61,8 @@ function! s:Path.cacheDisplayString() abort let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . ' {' . join(self._bookmarkNames) . '}' endif - if self.isSymLink + " Show symlink destination if instructed to + if self.isSymLink && g:NERDTreeShowSymlinkDest let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . ' -> ' . self.symLinkDest endif diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index c26842a0..0368bb4d 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -53,6 +53,7 @@ let g:NERDTreeShowFiles = get(g:, 'NERDTreeShowFiles', 1 let g:NERDTreeShowHidden = get(g:, 'NERDTreeShowHidden', 0) let g:NERDTreeShowLineNumbers = get(g:, 'NERDTreeShowLineNumbers', 0) let g:NERDTreeSortDirs = get(g:, 'NERDTreeSortDirs', 1) +let g:NERDTreeShowSymlinkDest = get(g:, 'NERDTreeShowSymlinkDest', 1) if !nerdtree#runningWindows() && !nerdtree#runningCygwin()