motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 0646a53c6bd0cba0e27d0251915b38f52fbb7d8a (tree)
parent d2abfca08f0ed3e617b7326a3bdad0624bfe1553
Author: Tim Pope <code@tpope.net>
Date:   Thu,  7 May 2020 07:14:18 -0400

Add Help: header

Closes https://github.com/tpope/vim-fugitive/issues/1513

Diffstat:
Mautoload/fugitive.vim | 4++++
Msyntax/fugitive.vim | 6++++++
2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -3627,6 +3627,10 @@ function! s:DoToggleHeadHeader(value) abort call search('\C^index$', 'wc') endfunction +function! s:DoToggleHelpHeader(value) abort + exe 'help fugitive-map' +endfunction + function! s:DoStagePushHeader(value) abort let remote = matchstr(a:value, '\zs[^/]\+\ze/') if empty(remote) diff --git a/syntax/fugitive.vim b/syntax/fugitive.vim @@ -8,6 +8,9 @@ syn spell notoplevel syn include @fugitiveDiff syntax/diff.vim 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 cluster fugitiveSection contains=fugitiveSection @@ -33,7 +36,10 @@ for s:section in ['Untracked', 'Unstaged', 'Staged'] endfor unlet s:section +hi def link fugitiveBareHeader fugitiveHeader +hi def link fugitiveHelpHeader fugitiveHeader hi def link fugitiveHeader Label +hi def link fugitiveHelpTag Tag hi def link fugitiveHeading PreProc hi def link fugitiveUntrackedHeading PreCondit hi def link fugitiveUnstagedHeading Macro