delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/06/13:26:48

From: Weiqi Gao <weiqigao AT a DOT crl DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: vim key commands - not too kool
Date: Mon, 06 Dec 1999 08:32:20 -0600
Organization: CRL Network Services
Lines: 43
Message-ID: <384BC8F4.A616873B@a.crl.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 991206130052 DOT 19924F-100000 AT is>
NNTP-Posting-Host: a116009.stl1.as.crl.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i586)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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)

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'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%)

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%)

-- 
Weiqi Gao
weiqigao AT a DOT crl DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019