mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Extract fugitiveblame ftplugin
References https://github.com/tpope/vim-fugitive/issues/1425
This commit is contained in:
@@ -5788,7 +5788,7 @@ function! s:BlameRehighlight() abort
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! s:BlameFileType() abort
|
||||
function! fugitive#BlameFileType() abort
|
||||
setlocal nomodeline
|
||||
setlocal foldmethod=manual
|
||||
if len(s:Dir())
|
||||
@@ -5821,7 +5821,6 @@ endfunction
|
||||
|
||||
augroup fugitive_blame
|
||||
autocmd!
|
||||
autocmd FileType fugitiveblame call s:BlameFileType()
|
||||
autocmd ColorScheme,GUIEnter * call s:BlameRehighlight()
|
||||
autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('<abuf>')), 'fugitive_leave')
|
||||
augroup END
|
||||
|
||||
6
ftplugin/fugitiveblame.vim
Normal file
6
ftplugin/fugitiveblame.vim
Normal file
@@ -0,0 +1,6 @@
|
||||
if exists("b:did_ftplugin") || !exists('*fugitive#BlameFileType')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
call fugitive#BlameFileType()
|
||||
Reference in New Issue
Block a user