mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 13:53:51 -05:00
Add Help: header
Closes https://github.com/tpope/vim-fugitive/issues/1513
This commit is contained in:
@@ -3627,6 +3627,10 @@ function! s:DoToggleHeadHeader(value) abort
|
|||||||
call search('\C^index$', 'wc')
|
call search('\C^index$', 'wc')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:DoToggleHelpHeader(value) abort
|
||||||
|
exe 'help fugitive-map'
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! s:DoStagePushHeader(value) abort
|
function! s:DoStagePushHeader(value) abort
|
||||||
let remote = matchstr(a:value, '\zs[^/]\+\ze/')
|
let remote = matchstr(a:value, '\zs[^/]\+\ze/')
|
||||||
if empty(remote)
|
if empty(remote)
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ syn spell notoplevel
|
|||||||
syn include @fugitiveDiff syntax/diff.vim
|
syn include @fugitiveDiff syntax/diff.vim
|
||||||
|
|
||||||
syn match fugitiveHeader /^[A-Z][a-z][^:]*:/ nextgroup=fugitiveHash,fugitiveSymbolicRef skipwhite
|
syn match fugitiveHeader /^[A-Z][a-z][^:]*:/ nextgroup=fugitiveHash,fugitiveSymbolicRef skipwhite
|
||||||
|
syn match fugitiveBareHeader /^Bare:/
|
||||||
|
syn match fugitiveHelpHeader /^Help:/ nextgroup=fugitiveHelpTag skipwhite
|
||||||
|
syn match fugitiveHelpTag /\S\+/ contained
|
||||||
|
|
||||||
syn region fugitiveSection start=/^\%(.*(\d\+)$\)\@=/ contains=fugitiveHeading end=/^$/
|
syn region fugitiveSection start=/^\%(.*(\d\+)$\)\@=/ contains=fugitiveHeading end=/^$/
|
||||||
syn cluster fugitiveSection contains=fugitiveSection
|
syn cluster fugitiveSection contains=fugitiveSection
|
||||||
@@ -33,7 +36,10 @@ for s:section in ['Untracked', 'Unstaged', 'Staged']
|
|||||||
endfor
|
endfor
|
||||||
unlet s:section
|
unlet s:section
|
||||||
|
|
||||||
|
hi def link fugitiveBareHeader fugitiveHeader
|
||||||
|
hi def link fugitiveHelpHeader fugitiveHeader
|
||||||
hi def link fugitiveHeader Label
|
hi def link fugitiveHeader Label
|
||||||
|
hi def link fugitiveHelpTag Tag
|
||||||
hi def link fugitiveHeading PreProc
|
hi def link fugitiveHeading PreProc
|
||||||
hi def link fugitiveUntrackedHeading PreCondit
|
hi def link fugitiveUntrackedHeading PreCondit
|
||||||
hi def link fugitiveUnstagedHeading Macro
|
hi def link fugitiveUnstagedHeading Macro
|
||||||
|
|||||||
Reference in New Issue
Block a user