gitvimvim-fugitive

Git commit --verbose in Fugitive


Is there a way to make :Gcommit from Fugitive Vim plugin verbose by default (git commit --verbose)?

I've tried the following without luck:

command! -nargs=* Gcommit Gcommit --verbose <args>

Also tried creating a commit alias in gitconfig, although aliases there don't seem to work with existent git commands.


Solution

  • The issues 126 of vim-fugitive mentions:

    Since git commit doesn't support default options, neither does :Gcommit.
    But you can create the equivalent of an alias:

    command -bar -bang -nargs=* Gci :Gcommit<bang> -v <args>
    

    With some autocmd trickery, you could remap C as well.