The same goes for :q and :Q. I almost always don't let up on shift quick enough and seeing that :Q and :W aren't used anyway I thought it would be nice to just have them do the same as their lower-case counterparts.
For example, :w saves your file and :q allows you to exit Vim.
You will see list of commands that matches characters in front of the cursor by pressing CTRL-D in the command mode. For example, if you pressed :se in normal mode, then pressed CTRL-D , you will see list of commands that start with se .
To quickly change a word you can use cw , caw or ciw . Use c$ or just C to quickly change from the cursor to the end of a line, cc to change an entire line, or cis for a sentence. The standard change word command requires you to type cw , then a new word, then press Escape.
The hack is via a :cmap
or :cabb
, but these have side effects (i.e. other instances will be inadvertently converted, too).
The cmdalias plugin does this better.
But I think for your use case it's best to define your own uppercase command-variants. The main challenge is to support all the options that the original one has:
command! -bang -range=% -complete=file -nargs=* W <line1>,<line2>write<bang> <args>
command! -bang Q quit<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