Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added toggle for displaying symlink destination #1367

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/NERDTree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 2 additions & 1 deletion lib/nerdtree/path.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions plugin/NERD_tree.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down