Ian Shields wrote: > In general. I agree with the sentiment that vi should cover only basic > commands. I think you need to know at least the following: > 1) How to get in and out of vi > 2) Enough about modes to know that there is a command mode and an insert > mode and pressing esc will get you out of insert mode if you're in it. > 3) How to move your cursor up, down, right and left and maybe to > end/beginning of line > 4) How to scroll a page in either direction > 5) How to search forward and backward for a string > 6) how to insert, edit and delete text. > 7) How to save or quit a file without saving.
Sounds reasonable to me. (Given that the arrow keys and Page-up/down do what's printed on them, that leaves “i”, “x”, “/”, “?”, “ZZ”, and “:q!”. We probably have to throw in “dd” and “J” because of the brain-damaged way vi deals with lines.) > I'm curious as to how you downgrade vi to a weight 1 objective and still > know enough to use it. I don't think most other weight 1 objectives > require this much skill. You can learn the above in a quarter of an hour using something like vimtutor, especially because you can immediately see what happens. Quotas are a weight-1 objective and they take longer than that if you actually configure them and convince yourself that they do what they claim. That includes some reasonably non-trivial stuff like soft and hard quotas, compared to which the basic vi command set outlined earlier is easy-peasy. (Although I'm secretly convinced quotas are weight-1 so it doesn't matter too much if you skip them altogether – I don't think I've seen a Linux system in the wild that was actually running quotas. Perhaps people still use them at universities.) > Did you ever ask anyone how they might do things if they had to operate > on a 2400, 4800, or 9600bps glass teletype instead of a fiber optic > internet connected graphical device with more pixels than old-timers > probably ever imagined possible? Nano presumably runs over a 2400bps connection about as well (or badly) as vi does. (I'm assuming you don't mean the real “glass teletypes” where you only get to add stuff at the bottom of the screen and where vi is forced into ex mode, because LPIC-1 doesn't cover ex. Which I hope we can all agree should stay that way.) In any case I don't think what people used to do back in the days of 2400bps glass teletypes should constrain what we're allowed to do now. Around that time, people also used to use the C shell, but fortunately LPIC-1 gives that program's strange and wonderful history-editing mechanisms, as carried over into bash, only very light coverage now that we can actually edit the command history like reasonable people, using arrow keys. Nobody seems to argue that we should all be using the Bourne shell (which doesn't have the concept of a command history) because it is the agreed standard for sysadmins, has been around forever, and (unlike bash) exists everywhere, even on traditional Unix – but yet something very similar appears to be the key argument in favour of vi. In the 1980s I used to use MicroEmacs on serial text terminals and that was just fine as far as I was concerned. > Generally agree. Except that there are a few other commands that assume > vi, such as visudo, vipw and vigr that assume vi as their default > editor. All of these use whatever editor the EDITOR variable says they should use. On my Debian system, they default to nano. They may have “vi” in their name but ultimately that doesn't mean a lot. Anselm -- Anselm Lingnau … Linup Front GmbH (MAX21) … Linux- & Open-Source-Schulungen [email protected], +49(0)6151-9067-0, Fax -299, www.linupfront.de Robert-Koch-Str. 9, 64331 Weiterstadt Post: Postf. 100121, 64201 Darmstadt DE Sitz: Weiterstadt (AG Darmstadt, HRB7705) Geschf: Oliver Michel, Nils Manegold _______________________________________________ lpi-discuss mailing list [email protected] http://list.lpi.org/cgi-bin/mailman/listinfo/lpi-discuss
