Move blame syntax to separate file
This commit is contained in:
parent
2b5fdf146a
commit
7e91b47021
@ -3982,7 +3982,6 @@ endfunction
|
|||||||
augroup fugitive_blame
|
augroup fugitive_blame
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd FileType fugitiveblame setlocal nomodeline | if len(s:Dir()) | let &l:keywordprg = s:Keywordprg() | endif
|
autocmd FileType fugitiveblame setlocal nomodeline | if len(s:Dir()) | let &l:keywordprg = s:Keywordprg() | endif
|
||||||
autocmd Syntax fugitiveblame call s:BlameSyntax()
|
|
||||||
autocmd User Fugitive
|
autocmd User Fugitive
|
||||||
\ if get(b:, 'fugitive_type') =~# '^\%(file\|blob\|blame\)$' || filereadable(@%) |
|
\ if get(b:, 'fugitive_type') =~# '^\%(file\|blob\|blame\)$' || filereadable(@%) |
|
||||||
\ exe "command! -buffer -bar -bang -range=0 -nargs=* Gblame :execute s:BlameCommand(<line1>,<line2>,+'<range>',<count>,<bang>0,'<mods>',<q-reg>,<q-args>,[<f-args>])" |
|
\ exe "command! -buffer -bar -bang -range=0 -nargs=* Gblame :execute s:BlameCommand(<line1>,<line2>,+'<range>',<count>,<bang>0,'<mods>',<q-reg>,<q-args>,[<f-args>])" |
|
||||||
@ -4206,8 +4205,7 @@ endfunction
|
|||||||
|
|
||||||
let s:hash_colors = {}
|
let s:hash_colors = {}
|
||||||
|
|
||||||
function! s:BlameSyntax() abort
|
function! fugitive#BlameSyntax() abort
|
||||||
let b:current_syntax = 'fugitiveblame'
|
|
||||||
let conceal = has('conceal') ? ' conceal' : ''
|
let conceal = has('conceal') ? ' conceal' : ''
|
||||||
syn match FugitiveblameBoundary "^\^"
|
syn match FugitiveblameBoundary "^\^"
|
||||||
syn match FugitiveblameBlank "^\s\+\s\@=" nextgroup=FugitiveblameAnnotation,fugitiveblameOriginalFile,FugitiveblameOriginalLineNumber skipwhite
|
syn match FugitiveblameBlank "^\s\+\s\@=" nextgroup=FugitiveblameAnnotation,fugitiveblameOriginalFile,FugitiveblameOriginalLineNumber skipwhite
|
||||||
|
7
syntax/fugitiveblame.vim
Normal file
7
syntax/fugitiveblame.vim
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
call fugitive#BlameSyntax()
|
||||||
|
|
||||||
|
let b:current_syntax = "fugitiveblame"
|
Loading…
Reference in New Issue
Block a user