tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: editors/ex is really vi



    Date:        Fri, 28 Dec 2012 05:43:06 +0000
    From:        David Holland <dholland-pkgtech%NetBSD.org@localhost>
    Message-ID:  <20121228054306.GA27741%netbsd.org@localhost>

  | The code that I just spent longer than I intended cleaning out, in
  | editors/ex, is actually the original ("one true") vi. While it also
  | includes ex, vi is the thing people know about... is there some reason
  | it's packaged under the name "ex" rather than "vi"?

ex is its real name - vi is just the "visual" command, one of ex's
operating modes.

It is just that it is so common, that if ex is run with argv[0] as "vi"
then when it starts it runs the visual (which can be abbreviated as "vi")
command after any other initialisation commands (+ args, etc).   You can
always leave visual mode with the 'Q' vi command, then you're back in
command line mode (ex mode if you like, or enhanced ed mode) (whether you
started the editor as "vi", or as "ex" with a later "vi[sual]" command).

There isn't really a (UCB) vi editor, or not if you want to be pedantic
about it.

kre


Home | Main Index | Thread Index | Old Index