3

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.

jviotti
  • 17,881
  • 26
  • 89
  • 148

2 Answers2

2

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

An old question, but in your gitconfig file if you add these two lines it'll do the trick:

[commit]
    verbose = true
Al-Baraa El-Hag
  • 770
  • 6
  • 15