23

GitHub - johngrib/vim-git-msg-wheel: Displays recent commit messages as an auto-...

 5 years ago
source link: https://github.com/johngrib/vim-git-msg-wheel
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

vim-git-msg-wheel

Show recent git commit messages and support line autocompletion.

English 한국어

gif

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

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK