Skip to content

Commit 0617569

Browse files
committed
vim: add command to retrieve branch description
This helps if the description stores common trailers (though a hook might be better than having to remember).
1 parent 943807a commit 0617569

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

links/vim/after/ftplugin/gitcommit.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ setlocal comments+=b:>
1616
nnoremap <buffer> <LocalLeader>d :DiffGitCached<CR>
1717
1818
command -buffer -bar -nargs=? Ref execute 'read !git show --no-patch --format=reference' empty(<q-args>) ? @* : <q-args> | -join
19+
command -buffer -bar Describe read !git config branch.$(git branch --show-current).description
1920

2021
let b:undo_ftplugin = bk#ftplugin#undo(#{
2122
\ opts: [
@@ -31,5 +32,6 @@ let b:undo_ftplugin = bk#ftplugin#undo(#{
3132
\ ],
3233
\ commands: [
3334
\ 'Ref',
35+
\ 'Describe',
3436
\ ],
3537
\ })

0 commit comments

Comments
 (0)