Updated plugins
This commit is contained in:
@@ -118,7 +118,7 @@ function! s:Creator.createWindowTree(dir)
|
||||
|
||||
"we need a unique name for each window tree buffer to ensure they are
|
||||
"all independent
|
||||
exec g:NERDTreeCreatePrefix . ' edit ' . self._nextBufferName()
|
||||
exec g:NERDTreeCreatePrefix . ' edit ' . self._nextBufferName('win')
|
||||
|
||||
call self._createNERDTree(path, 'window')
|
||||
let b:NERDTree._previousBuf = bufnr(previousBuf)
|
||||
@@ -210,7 +210,7 @@ function! s:Creator._createTreeWin()
|
||||
let l:splitSize = g:NERDTreeWinSize
|
||||
|
||||
if !g:NERDTree.ExistsForTab()
|
||||
let t:NERDTreeBufName = self._nextBufferName()
|
||||
let t:NERDTreeBufName = self._nextBufferName('tab')
|
||||
silent! execute l:splitLocation . l:splitDirection . ' ' . l:splitSize . ' new'
|
||||
silent! execute 'edit ' . t:NERDTreeBufName
|
||||
silent! execute l:splitDirection . ' resize '. l:splitSize
|
||||
@@ -244,10 +244,22 @@ function! s:Creator.New()
|
||||
return newCreator
|
||||
endfunction
|
||||
|
||||
" FUNCTION: s:Creator._nextBufferName() {{{1
|
||||
" returns the buffer name for the next nerd tree
|
||||
function! s:Creator._nextBufferName()
|
||||
let name = s:Creator.BufNamePrefix() . self._nextBufferNumber()
|
||||
" FUNCTION: s:Creator._nextBufferName(type='') {{{1
|
||||
" gets an optional buffer type of either 'tab' or 'win'.
|
||||
" returns the buffer name for the next nerd tree of such type.
|
||||
function! s:Creator._nextBufferName(...)
|
||||
if a:0 > 0
|
||||
let type = a:1
|
||||
else
|
||||
let type = ''
|
||||
end
|
||||
let name = s:Creator.BufNamePrefix()
|
||||
if type ==# 'tab'
|
||||
let name = name . 'tab_'
|
||||
elseif type ==# 'win'
|
||||
let name = name . 'win_'
|
||||
endif
|
||||
let name = name . self._nextBufferNumber()
|
||||
return name
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ function! s:NERDTree.GetWinNum()
|
||||
|
||||
" If WindowTree, there is no t:NERDTreeBufName variable. Search all windows.
|
||||
for w in range(1,winnr('$'))
|
||||
if bufname(winbufnr(w)) =~# '^' . g:NERDTreeCreator.BufNamePrefix() . '\d\+$'
|
||||
if bufname(winbufnr(w)) =~# '^' . g:NERDTreeCreator.BufNamePrefix() . 'win_\d\+$'
|
||||
return w
|
||||
endif
|
||||
endfor
|
||||
|
||||
@@ -62,6 +62,7 @@ function! s:UI._dumpHelp()
|
||||
let help .= "\"\n\" ----------------------------\n"
|
||||
let help .= "\" Bookmark table mappings~\n"
|
||||
let help .= "\" double-click,\n"
|
||||
let help .= '" '. g:NERDTreeMapJumpBookmarks .": jump to bookmark table\n"
|
||||
let help .= '" '. g:NERDTreeMapActivateNode .": open bookmark\n"
|
||||
let help .= '" '. g:NERDTreeMapPreview .": preview file\n"
|
||||
let help .= '" '. g:NERDTreeMapPreview .": find dir in tree\n"
|
||||
@@ -482,10 +483,10 @@ function! s:UI.toggleIgnoreFilter()
|
||||
call self.centerView()
|
||||
endfunction
|
||||
|
||||
" FUNCTION: s:UI.toggleShowBookmarks() {{{1
|
||||
" Toggle the visibility of the Bookmark table.
|
||||
function! s:UI.toggleShowBookmarks()
|
||||
let self._showBookmarks = !self._showBookmarks
|
||||
" FUNCTION: s:UI.setShowBookmarks() {{{1
|
||||
" Sets the visibility of the Bookmark table.
|
||||
function! s:UI.setShowBookmarks(value)
|
||||
let self._showBookmarks = a:value
|
||||
|
||||
if self.getShowBookmarks()
|
||||
call self.nerdtree.render()
|
||||
@@ -503,6 +504,12 @@ function! s:UI.toggleShowBookmarks()
|
||||
call self.centerView()
|
||||
endfunction
|
||||
|
||||
" FUNCTION: s:UI.toggleShowBookmarks() {{{1
|
||||
" Toggle the visibility of the Bookmark table.
|
||||
function! s:UI.toggleShowBookmarks()
|
||||
call self.setShowBookmarks(!self._showBookmarks)
|
||||
endfunction
|
||||
|
||||
" FUNCTION: s:UI.toggleShowFiles() {{{1
|
||||
" toggles the display of hidden files
|
||||
function! s:UI.toggleShowFiles()
|
||||
|
||||
Reference in New Issue
Block a user