www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/05/19:08:35

From: Weiqi Gao <weiqigao AT a DOT crl DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: vim key commands - not too kool
Date: Sun, 05 Dec 1999 17:49:05 -0600
Organization: CRL Network Services
Lines: 38
Message-ID: <384AF9F1.F8E7B008@a.crl.com>
References: <199912052219 DOT RAA31641 AT delorie DOT com>
NNTP-Posting-Host: a116022.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

Leon wrote:
> 
> > BOLLOCKS!
> > For example, to write the current file and quit:
> > In vim (multiplatform), it's :wq
> > In Notepad and most other Windows editors, it's M-f s M-F4
> > Now which is easier to type and understand? vim.
> 
> i don't think so dude!
> you first have to make sure you in that silly normal mode - so do not
> forget esc key. So- to do that in VIM  -
> 1) esc key
> 2) shift jey
> 3) colon key
> 4) w key
> 5) q key
> 6) return key
> 
> how f!@#$ stupid.

This sequence of keystrokes might not be the most newbie friendly, but
it certainly follows a logical pattern, and once you get used to it, it
become something that you never THINK about while you are editing.  It
becomes a pattern of usage, just like "ls -lart" and "rm -rf /".  The
familiarity is what saves your time and energy.

BTW, there is a way to save and quit without hitting the ':' key.  Like
I said in earlier posts, vi and EMACS has much more to offer to the
professional programmer in the long run.

Homework: 1.  Find out what the 'ZZ' sequence does in vi normal mode.
2.  How do you gather all the '#include' lines from all the *.c files in
the current direcory, sort them, eliminate duplicates and prepend the
result to the currently edited file?

-- 
Weiqi Gao
weiqigao AT a DOT crl DOT com

- Raw text -


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