Mail Archives: djgpp/1999/12/05/19:08:35
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 -