mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Replace YanRing with yank-stack and update plugins
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user