Need help with committia.vim?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

491 Stars 23 Forks MIT License 134 Commits 6 Opened issues


A Vim plugin for more pleasant editing on commit messages

Services available


Need anything else?

Contributors list

More Pleasant Editing on Commit Message

When you type

git commit
, Vim starts and opens a commit buffer. This plugin improves the commit buffer.

committia.vim splits the buffer into 3 windows; edit window, status window and diff window. You no longer need to repeat moving to another window, scrolling and backing to the former position in order to see a long commit diff.

If the width of Vim window is too narrow (160 characters by default), committia.vim falls back to single column mode, which has 2 windows; edit window and diff window.

For wide window:

double column mode

For narrow window:

single column mode


You can hook on opening the windows.

Available hooks are:

  • edit_open
    : When opening a commit message window, this hook is called from the window.
  • diff_open
    : When opening a diff window, this hook is called from the window.
  • status_open
    : When opening a status window, this hook is called from the window. Please note that this hook is not called on single-column mode since it does not have a dedicated window for status.

A vimrc example is below.

" You can get the information about the windows with first argument as a dictionary.
"   KEY              VALUE                      AVAILABILITY
"   vcs            : vcs type (e.g. 'git')   -> all hooks
"   edit_winnr     : winnr of edit window    -> ditto
"   edit_bufnr     : bufnr of edit window    -> ditto
"   diff_winnr     : winnr of diff window    -> ditto
"   diff_bufnr     : bufnr of diff window    -> ditto
"   status_winnr   : winnr of status window  -> all hooks except for 'diff_open' hook
"   status_bufnr   : bufnr of status window  -> ditto

let g:committia_hooks = {} function! g:committia_hooks.edit_open(info) " Additional settings setlocal spell

" If no commit message, start with insert mode
if a:info.vcs ==# 'git' && getline(1) ==# ''

" Scroll the diff window from insert mode
" Map <c-n> and <c-p>
imap <buffer><c-n> <plug>(committia-scroll-diff-down-half)
imap <buffer><c-p> <plug>(committia-scroll-diff-up-half)



Mappings to scroll diff window for insert mode are available.

| Mapping | Description | |-------------------------------------------|-----------------------------------------------| |

| Scroll down the diff window by half a screen. | |
| Scroll up the diff window by half a screen. | |
| Scroll down the diff window by a screen. | |
| Scroll up the diff window by a screen. | |
| Scroll down the diff window by one line. | |
| Scroll up the diff window by one line. |


Some variables are available to control the behavior of committia.vim.


If the value is

, committia.vim always attempts to open committia's buffer when
buffer is opened. If you use vim-fugitive, I recommend to set this value to


If the value is

, committia.vim always employs single column mode.


If the width of window is narrower than the value, committia.vim employs single column mode.

'belowright split'

Vim command which opens a status window in multi-columns mode.

'botright vsplit'

Vim command which opens a diff window in multi-columns mode.

'belowright split'

Vim command which opens a diff window in single-column mode.


If committia.vim is in multi-columns mode, specifies the width of the edit window.


  • Cooperate with vim-fugitive.
  • Add more VCS supports
  • Test all features



Distributed under the MIT license

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.