> I know every ex command starts with a colon. > > Is the reverse true in every case? > Is _every_ command that starts with a colon an ex command? > > Examples > :help Is this an ex command? > :version Is this? > :blahblah This?
My understanding is that _yes_, typing the colon temporarily enters "ex" mode for one command. To try things out, you can use "Q" to enter actual "ex" mode (use "vi" to re-enter visual mode). There may be some caveats, such as in general, one can do :g/regexp/ex-command However, while ":g" is an ex command, it can't be nested within an outer ":g" command (as noted in the help). There may be a distinction between "what vim treats as 'ex' mode" and "what classic vi/ex supports", but this might be changeable by the 'cp' option to ensure compatibility with old vi/ex. Pretty much any command you can use in ex mode, one can also use in scripts (and vice-versa) which makes for some very powerful vim-script actions. With further information about what you're trying to do, it might shed light on small nuances of difference, but for the most part, one can assume that if it starts with a colon, it's an ex command. -tim