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

Replace YanRing with yank-stack and update plugins

This commit is contained in:
amix
2017-12-13 15:05:24 +01:00
parent 2ca843a22a
commit 53894de44b
72 changed files with 1663 additions and 5015 deletions

View File

@ -241,7 +241,7 @@ augroup fugitive
autocmd!
autocmd BufNewFile,BufReadPost * call fugitive#detect(expand('%:p'))
autocmd FileType netrw call fugitive#detect(expand('%:p'))
autocmd User NERDTreeInit,NERDTreeNewRoot call fugitive#detect(b:NERDTreeRoot.path.str())
autocmd User NERDTreeInit,NERDTreeNewRoot call fugitive#detect(b:NERDTree.root.path.str())
autocmd VimEnter * if expand('<amatch>')==''|call fugitive#detect(getcwd())|endif
autocmd CmdWinEnter * call fugitive#detect(expand('#:p'))
autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('<abuf>')), 'fugitive_leave')
@ -661,7 +661,9 @@ function! s:buffer_expand(rev) dict abort
else
let file = a:rev
endif
return s:sub(s:sub(file,'\%$',self.path()),'\.\@<=/$','')
return s:sub(substitute(file,
\ '%$\|\\\([[:punct:]]\)','\=len(submatch(1)) ? submatch(1) : self.path()','g'),
\ '\.\@<=/$','')
endfunction
function! s:buffer_containing_commit() dict abort