Mail Archives: djgpp/1999/12/06/15:07:02
In our last episode <384BC8F4 DOT A616873B AT a DOT crl DOT com>,
the lovely and talented Weiqi Gao <weiqigao AT a DOT crl DOT com>
broadcast on comp.os.msdos.djgpp:
|Eli Zaretskii wrote:
|>
|> On Sun, 5 Dec 1999, Lars Eighner wrote:
|>
|> > 1. shift F2 (search backwards)
|> > 2. o
|> > 3. esc (search on o)
|> > 4. backspace (rub o)
|> > 5. i (insert i)
|> > 6. home
|> > 7. home
|> > 8. down arrow (to end of document)
|> > (or 6. home, 7. right arrow, 8. down arrow, to return to end
|> > of second line if that is not the end of document)
6, 7, and 8 can be Ctrl-Home if it was the end-of-document. Also
down arrow will work if the end of the second line is to the
left of the error.
|
|In vi, I would do:
|1. ESC (get out of editing mode)
|2. Fo (search backward for 'o' on the same line)
|3. ri (replace the current character by i)
|4. $ (go back to the end of the line again)
That takes you to the end of the NEXT line? That was the
statement of the original problem. The cursor begins on the
line following the error. The problem does not quite make
clear whether this is the end of document or could be
a couple of lines being inserted somewhere in the middle of
a document.
|
|(That's six key strokes, a savings of 25%)
|
|> Here's the Emacs sequence that does the same:
|>
|> Ctrl-R (search in reverse)
|> o (search for o)
|> DEL (delete o)
|> i (insert i)
|... and Ctrl-E (to go back to eol)
|
|(That's five key strokes, a savings of an additional 17%)
I think for the minimum in emacs that meets all the conditions
of the problem, you have to begin by dropping a mark and end
by switching the cursor and the mark.
The only keystroke saved is that from not having to terminal
the search string, owing to progressive searching in emacs --
which tends to make me dizzy without adding any real usefulness
that I can see.
|Here's an devil's advocate solution in EDIT:
|1. Back-arrow (hold it until the cursor is exactly on the 'o')
|2. i (you were typing in overwriting mode)
|3. Forward-arrow (hold it until the cursor reaches the end of line)
|
|(That's a total of three keystrokes, another savings of 40%)
Did they ever fix EDIT so it became possible to insert another
file without having to mess with the clipboard?
--
Lars Eighner 700 Hearn #101 Austin TX 78703 eighner AT io DOT com
(512) 474-1920 (FAX answers 6th ring) http://www.io.com/%7Eeighner/
bookstore: http://www.io.com/%7Eeighner/bookstore/
A pessimist complains about noise when opportunity knocks
- Raw text -