A.J.Mechelynck wrote:

Thanks Tim, Yakov and Martin.
I'll just ASSume from now on that, if it starts with a colon,
it may as be an ex command.
Very interesting information on the use of ex.

Larry


Vhat Vim calls "ex-commands" are prefixed by a colon when typed at the command-line (the colon is actually used to go from Normal mode to Command-line mode). There are more of them than what was originally valid in the "ex" program; and you can even define your own (using the ":command" command).

In scripts, or after another command like ":vertical", ":botright", ":browse", ":verbose", ":autocommand EventName *", etc., the colon is not necessary: e.g.

    :vert split foobar.txt
    :bot help pattern-overview
    :verbose set guifont?
    :browse edit
    :au VimLeave * set verbose=0
    :if has("gui_running") | set lines=9999 columns=9999 | endif

The commands

    split foobar.txt
    help pattern-overview
    set guifont?
    edit
    set verbose=0
    set lines=9999 columns=9999
    endif

are ex-commands, which don't need a colon because there is something before them on the same command-line. (Note that ":if" and ":endif", when typed at the command-line, should be on the same line as above)


Best regards,
Tony.

Thanks for your (as usual) very good information Tony.

I had thought Normal and Command mode was two names for the same thing.
Are you saying that Command mode is ex mode?

What do you mean by "something before them" when using the split command? I have always typed ':sp foobar'. Are you saying that is not necessary or (shudder) wrong?

How can I redirect the very long list of ex commands to a file?
:he ex-cmd-index >file doesn't work.


Larry
--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux

Reply via email to