Sometimes in vim, I accidentally type :Q instead of :q in normal mode. To work around this, I've added this in my .vimrc:
command Q q
This works fine for :Q, but in case I type :Q!, vim responds with "No ! allowed". How do I make vim accept :Q! and interpret it as :q! ?
:command -bang Q quit<bang>
For more information, see :help :command-bang
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With