vim-git-msg-wheel
Show recent git commit messages and support line autocompletion.
Why should I use this?
It would not be a good git usage habit to reuse commit messages.
Sometimes, however, I see the old commit message and try to recycle it.
- View recent commit messages as a list.
- You can autocomplete and modify old commit messages and write new commit messages.
Installation
.gitconfig
Open .gitconfig, and check editor
is specified as the vim you are using.
[core]
editor = /usr/local/bin/vim
The easiest way to find out what vim you are using is to check with which vim
.
$ which vim
Please change if the path of .gitconfig.core.editor differs from the output of which vim
command.
VimPlug
Place this in your .vimrc:
Plug 'johngrib/vim-git-msg-wheel'
Then run the following in Vim:
:source %
:PlugInstall
Configuraion
define auto complete key
- default value is
<C-l>
" use ctrl+a to show commit message auto complete list
let g:git_msg_wheel_key = '<C-a>'
number of commit messages to import
- default value is
50
let g:git_msg_wheel_length = 100
show/hide old commit messages in comment
- default value is
1
let g:git_msg_wheel_list_show = 0 " hide list