Add option to disable collapsing of diretory names
This commit is contained in:
parent
88946e9832
commit
b2bbed41fa
@ -668,14 +668,18 @@ NERD tree. These options should be set in your vimrc.
|
||||
|'NERDTreeWinSize'| Sets the window size when the NERD tree is
|
||||
opened.
|
||||
|
||||
|'NERDTreeMinimalUI'| Disables display of the 'Bookmarks' label and
|
||||
|'NERDTreeMinimalUI'| Disables display of the 'Bookmarks' label and
|
||||
'Press ? for help' text.
|
||||
|
||||
|'NERDTreeCascadeSingleChildDir'|
|
||||
Collapses on the same line directories that
|
||||
have only one child directory.
|
||||
|
||||
|'NERDTreeCascadeOpenSingleChildDir'|
|
||||
Cascade open while selected directory has only
|
||||
one child that also is a directory.
|
||||
|
||||
|'NERDTreeAutoDeleteBuffer'| Tells the NERD tree to automatically remove
|
||||
|'NERDTreeAutoDeleteBuffer'| Tells the NERD tree to automatically remove
|
||||
a buffer when a file is being deleted or renamed
|
||||
via a context menu command.
|
||||
|
||||
@ -984,7 +988,18 @@ of the following lines to set this option: >
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'NERDTreeCascadeOpenSingleChildDir'*
|
||||
*'NERDTreeCascadeSingleChildDir'*
|
||||
Values: 0 or 1
|
||||
Default: 1.
|
||||
|
||||
When displaying dir nodes, this option tells NERDTree to collapse dirs that
|
||||
have only one child. Use one of the follow lines to set this option: >
|
||||
let NERDTreeCascadeSingleChildDir=0
|
||||
let NERDTreeCascadeSingleChildDir=1
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'NERDTreeCascadeOpenSingleChildDir'*
|
||||
Values: 0 or 1
|
||||
Default: 1.
|
||||
|
||||
@ -998,7 +1013,7 @@ useful for Java projects. Use one of the follow lines to set this option: >
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'NERDTreeAutoDeleteBuffer'*
|
||||
*'NERDTreeAutoDeleteBuffer'*
|
||||
Values: 0 or 1
|
||||
Default: 0.
|
||||
|
||||
|
@ -250,6 +250,10 @@ endfunction
|
||||
"FUNCTION: TreeDirNode.isCascadable() {{{1
|
||||
"true if this dir has only one visible child - which is also a dir
|
||||
function! s:TreeDirNode.isCascadable()
|
||||
if g:NERDTreeCascadeSingleChildDir == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let c = self.getVisibleChildren()
|
||||
return len(c) == 1 && c[0].path.isDirectory
|
||||
endfunction
|
||||
|
@ -74,6 +74,7 @@ else
|
||||
call s:initVariable("g:NERDTreeDirArrowCollapsible", "~")
|
||||
endif
|
||||
call s:initVariable("g:NERDTreeCascadeOpenSingleChildDir", 1)
|
||||
call s:initVariable("g:NERDTreeCascadeSingleChildDir", 1)
|
||||
|
||||
if !exists("g:NERDTreeSortOrder")
|
||||
let g:NERDTreeSortOrder = ['\/$', '*', '\.swp$', '\.bak$', '\~$']
|
||||
|
Loading…
Reference in New Issue
Block a user