Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 962
jviotti Avatar asked Jun 09 '26 03:06

jviotti


1 Answers

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.

like image 172
VonC Avatar answered Jun 11 '26 18:06

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!