From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcda7,71c35a0e73c110d5 X-Google-Attributes: gidfcda7,public X-Google-Thread: 10872d,71c35a0e73c110d5 X-Google-Attributes: gid10872d,public X-Google-Thread: 11035d,71c35a0e73c110d5 X-Google-Attributes: gid11035d,public X-Google-Thread: 115614,71c35a0e73c110d5 X-Google-Attributes: gid115614,public X-Google-Thread: fa528,71c35a0e73c110d5 X-Google-Attributes: gidfa528,public X-Google-Thread: 1164f8,71c35a0e73c110d5 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2003-08-13 01:18:06 PST Path: archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!freenix!proxad.net!peer1.news.newnet.co.uk!peer1.news.newnet.co.uk!zen.net.uk!news-stoc.telia.net!news-stoa.telia.net!telia.net!nntp.inet.fi!inet.fi!newsfeed1.nokia.com!news1.nokia.com!news2.nokia.com.POSTED!not-for-mail Newsgroups: comp.sys.hp.hpux,comp.unix.tru64,comp.sys.dec,comp.unix.solaris,comp.sys.sgi.admin,comp.unix.aix From: Mikko Nahkola Subject: Re: Free UNIX for non-commerical use. References: <3F233C74.4F4C3BAB@ntlworld.com> <3F37B042.9060104@gwu.edu> Reply-To: mnahkola@trein.ntc.nokia.com Message-ID: User-Agent: slrn/0.9.7.4 (Linux) Date: Wed, 13 Aug 2003 08:07:13 GMT NNTP-Posting-Host: 172.22.102.71 X-Complaints-To: newsmaster@nokia.com X-Trace: news2.nokia.com 1060762033 172.22.102.71 (Wed, 13 Aug 2003 11:07:13 EET DST) NNTP-Posting-Date: Wed, 13 Aug 2003 11:07:13 EET DST Organization: Nokia Xref: archiver1.google.com comp.sys.hp.hpux:30383 comp.unix.tru64:10668 comp.sys.dec:16761 comp.unix.solaris:165906 comp.sys.sgi.admin:19086 comp.unix.aix:54752 In article , Peter da Silva wrote: > In article <3F37B042.9060104@gwu.edu>, Chris Mattern wrote: >> You don't understand what he means by "insert mode". You have no idea of >> what he is talking about. You have no understanding of vi whatsoever. >> The opposite of "insert mode" is not "overwrite mode". The opposite >> of "insert mode" is "command mode". > The distinction between "insert mode" and "command mode" is an illusion. > OK, OK, I'll just spill the beans. > There are three modes in vi, but most people only ever see one of them. > There's "vi mode", "ex mode", and "open mode". > It's very rare that you'll ever leave "vi mode". Ah, the book I mentioned, effectively says that "open mode" is a sub-mode of the "ex mode". IIRC I have used it on occasion, it is useful if you just can't make the terminal to behave right. And, I find that people do use the :command stuff, they just don't know that there's another mode there. Say, ":q" ... > In "vi mode" you are always entering a command. > A command consists of an option count, a command letter, and possibly an > argument. > The argument is either text terminated by an escape, text terminated by a > return (for convenience, when a return isn't a possible input), or another > command. I understood that the text input mode is for inputting the arguments to the command ... about at the point where the book said that "i" isn't a printing command, and that the text appears already before the command being completed is just a side-effect of the terminal handling routines. Indeed, later there was a case where that didn't happen until I fixed it. > Play with it for a while, try things like "6a123456789^[" or "I<-- ^[...", or > look at what gets undone when you do an "undo" after an insert. If you think > of it as "the insert command I haven't yet finished" and get used to being > in a "command mode" mental mode all the time, you'll find vi a lot friendlier. And besides, it is more useful that way. At least, once you manage to learn it ... which shouldn't be all that hard. > "But," you say, "what about arrow keys?" > That's right... they're just macros. They terminate the current command (^[), > move (h, j, k, or l), and start a new insert command (a). They're a > convenience feature, one I find more annoying than useful, not really part > of the syntax. Well, they aren't always available either ... another point that seems hard to understand for some people. > There's a handful of commands that were added to vi late in the design that > don't follow these rules. I consider two notable: > > ZZ This is just a shortcut for ":x^[". And is specifically warned against in more than one book. That might be a bit silly too ... -- Mikko Nahkola #include #Not speaking for my employer. No warranty. YMMV.