[Gllug] HTML editors

tet at accucard.com tet at accucard.com
Tue Dec 18 15:10:41 UTC 2001


>I do use vi for simple editing of config files but I don't find the
>interface very user-friendly. I think it must have been designed when
>keyboards didn't have arrow keys, numeric keypads or function keys.

Essentially correct, yes. It was designed to work on pretty much
any terminal (and was what prompted the development of termcap --
previous editors used hardcoded escape sequences for given terminal
types). One of the design criteria of vi was that it shouldn't rely on
keys that were likely to be missing on some terminals (and in those
days, that included numeric keypads, function keys, and even in a few
cases, arrow keys). It's terminal independence was a great asset, and
probably helped increase its popularity. That's not to say that it
can't make use of the extra keys if you have them, though. Under vim,
you can do:

	:map <F1> :wq^M

Press the actual F1 key to insert it, and remember to prefix the
ctrl-m with a ctrl-v to mark it as literal.

>Maybe vi is used more for historical then logical reasons?

Nope. It's used (by me, at least) becasue I've yet to find anything
else as good at editing text. Yes, it has a relatively steep learning
curve, but after you've learned how to use it, you'll wonder how you
ever got by with anything else.

	The cycle of editing and testing is very convenient in VB,
	though the facilities for viewing and editing text are so
	primitive that one yearns for a powerful editor like ed.

	-- Brian Kernighan, on the lack of decent editors under Windows

>For this I want to use as few keys as possible so Ctrl, Shift, c, v,
>arrow keys and PgUp, PgDn, Del, Home, End are fine.

Getting your work done in the minimum number of keypresses is
*precisely* why I use vi. I've yet to find anything as efficient
at editing text -- which is, after all, what a text editor is
supposed to do...

BTW, if you're using vim, "v" (or "V" or "ctrl-v", depending on which
sort of select you want) will let you "graphically" select regions of
text which can then be cut (with "x"), copied (with "y") and pasted
(with "p" or "P", depending on where you want it). I think that's what
you're describing doing under windows. Of course, if you really wanted
to, you could map ctrl-x/c/v to perform the same functions that they
do under Windows...

>I do occasionally find myself trying to do :wq though when using some
>MS editor.

"ZZ" achieves the same with fewer keypresses :-)

Tet

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list