1
0
mirror of https://github.com/amix/vimrc synced 2025-07-06 16:05:01 +08:00

Update plugins using update_plugins.py

This commit is contained in:
Geezus
2019-07-08 11:44:45 -05:00
parent a25315c274
commit 0502b849ed
115 changed files with 3723 additions and 1662 deletions

View File

@ -13,9 +13,6 @@ let g:NERDTreeCreator = s:Creator
" FUNCTION: s:Creator._bindMappings() {{{1
function! s:Creator._bindMappings()
"make <cr> do the same as the activate node mapping
nnoremap <silent> <buffer> <cr> :call nerdtree#ui_glue#invokeKeyMap(g:NERDTreeMapActivateNode)<cr>
call g:NERDTreeKeyMap.BindAll()
command! -buffer -nargs=? Bookmark :call nerdtree#ui_glue#bookmarkNode('<args>')
@ -189,18 +186,20 @@ function! s:Creator._createTreeWin()
let t:NERDTreeBufName = self._nextBufferName()
silent! execute l:splitLocation . 'vertical ' . l:splitSize . ' new'
silent! execute 'edit ' . t:NERDTreeBufName
silent! execute 'vertical resize '. l:splitSize
else
silent! execute l:splitLocation . 'vertical ' . l:splitSize . ' split'
silent! execute 'buffer ' . t:NERDTreeBufName
endif
setlocal winfixwidth
call self._setCommonBufOptions()
if has('patch-7.4.1925')
clearjumps
endif
setlocal winfixwidth
endfunction
" FUNCTION: s:Creator._isBufHidden(nr) {{{1
@ -218,14 +217,14 @@ function! s:Creator.New()
return newCreator
endfunction
" FUNCTION: s:Creator._nextBufferName() {{{2
" 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()
return name
endfunction
" FUNCTION: s:Creator._nextBufferNumber() {{{2
" FUNCTION: s:Creator._nextBufferNumber() {{{1
" the number to add to the nerd tree buffer name to make the buf name unique
function! s:Creator._nextBufferNumber()
if !exists("s:Creator._NextBufNum")

View File

@ -31,7 +31,7 @@ function! s:MenuController.showMenu()
let l:done = 0
while !l:done
redraw!
mode
call self._echoPrompt()
let l:key = nr2char(getchar())

View File

@ -153,7 +153,7 @@ endfunction
"FUNCTION: s:NERDTree.IsOpen() {{{1
function! s:NERDTree.IsOpen()
return s:NERDTree.GetWinNum() != -1
return s:NERDTree.GetWinNum() != -1 || bufname('%') =~# '^' . g:NERDTreeCreator.BufNamePrefix() . '\d\+$'
endfunction
"FUNCTION: s:NERDTree.isTabTree() {{{1

View File

@ -620,6 +620,11 @@ function! s:TreeDirNode.reveal(path, ...)
if self.path.equals(a:path.getParent())
let n = self.findNode(a:path)
" We may be looking for a newly-saved file that isn't in the tree yet.
if n == {}
call self.refresh()
let n = self.findNode(a:path)
endif
if has_key(opts, "open")
call n.open()
endif

View File

@ -6,7 +6,7 @@
let s:UI = {}
let g:NERDTreeUI = s:UI
" FUNCTION: s:UI.centerView() {{{2
" FUNCTION: s:UI.centerView() {{{1
" centers the nerd tree window around the cursor (provided the nerd tree
" options permit)
function! s:UI.centerView()
@ -28,7 +28,6 @@ function! s:UI._dumpHelp()
let help .= "\" ============================\n"
let help .= "\" File node mappings~\n"
let help .= "\" ". (g:NERDTreeMouseMode ==# 3 ? "single" : "double") ."-click,\n"
let help .= "\" <CR>,\n"
if self.nerdtree.isTabTree()
let help .= "\" ". g:NERDTreeMapActivateNode .": open in prev window\n"
else
@ -44,6 +43,7 @@ function! s:UI._dumpHelp()
let help .= "\" ". g:NERDTreeMapPreviewSplit .": preview split\n"
let help .= "\" ". g:NERDTreeMapOpenVSplit .": open vsplit\n"
let help .= "\" ". g:NERDTreeMapPreviewVSplit .": preview vsplit\n"
let help .= "\" ". g:NERDTreeMapCustomOpen .": custom open\n"
let help .= "\"\n\" ----------------------------\n"
let help .= "\" Directory node mappings~\n"
@ -52,6 +52,7 @@ function! s:UI._dumpHelp()
let help .= "\" ". g:NERDTreeMapOpenRecursively .": recursively open node\n"
let help .= "\" ". g:NERDTreeMapOpenInTab.": open in new tab\n"
let help .= "\" ". g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n"
let help .= "\" ". g:NERDTreeMapCustomOpen .": custom open\n"
let help .= "\" ". g:NERDTreeMapCloseDir .": close parent of node\n"
let help .= "\" ". g:NERDTreeMapCloseChildren .": close all child nodes of\n"
let help .= "\" current node recursively\n"
@ -66,6 +67,7 @@ function! s:UI._dumpHelp()
let help .= "\" ". g:NERDTreeMapPreview .": find dir in tree\n"
let help .= "\" ". g:NERDTreeMapOpenInTab.": open in new tab\n"
let help .= "\" ". g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n"
let help .= "\" ". g:NERDTreeMapCustomOpen .": custom open\n"
let help .= "\" ". g:NERDTreeMapDeleteBookmark .": delete bookmark\n"
let help .= "\"\n\" ----------------------------\n"
@ -252,7 +254,7 @@ endfunction
" gets the line number of the root node
function! s:UI.getRootLineNum()
let rootLine = 1
while getline(rootLine) !~# '^\(/\|<\)'
while rootLine <= line('$') && getline(rootLine) !~# '^\(/\|<\)'
let rootLine = rootLine + 1
endwhile
return rootLine