I frequently find myself wondering what the command-mode version of a normal-mode command is, usually to use it in a g/// expression. For instance, the equivalent of “J” is “join”, and the equivalent of “dd” is “d” (or at least it seems like it). Is there a general way of figuring this out – a help function I’m missing, or just a list somewhere?
(Right now I’m looking for a command-mode equivalent of gq, but this happens often enough that a general solution would be better.)
There are not functions for all the commands (most commands are pretty simple and some even involve switching to other modes).
The
:joincommand is really an exception. To use normal mode commands, just useIf you want to write a script, use
:normal!, because you should not trust the vimrc’s out there.