Linux Today: Linux News On Internet Time.

Linux Productivity Magazine: VI and Vim

Dec 11, 2002, 07:00 (19 Talkback[s])
(Other stories by Steve Litt)

"Who would guess to press 'l' to go right. Shouldn't 'l' go left? What in the world is the rationale for using 'h' to go right? One would think 'h' would mean 'higher' or some such thing. 'j' and 'k' for down and up respectively is just plain weird. And how strange is the 2 mode system, where the insert mode is for typing, and the command mode is for editing, necessitating constant switching between them. Many VI implementations cannot even facilitate a mouse, nor can they highlight text with the Shift+Arrow hotkey, nor skip words with Ctrl+Arrow. As a modern software developer I've been trained to make my apps intuitive.

"But anyone who has been around the block a few times knows there's a tradeoff between beginner's intuitiveness and master's productivity. VI has been optimized entirely for the touch typist. l, h, j and k are easily touch typing home position accessible. Cursor (arrow) keys are not. In the time you can move your hand from the keyboard to the mouse, a VI master can cut the current paragraph and move it above the preceding paragraph. (Keystrokes {d}{P}). VI is built exclusively for speed. Well, almost exclusively.

"VI is built for power too. By combining VI's range enabled global commands, range enabled search and replace commands, regular expressions, macros and scripts, you can effect almost any conceivable transformation on a file. If the transformation can be described in English, it can be done with VI. And in VI it usually can be done in 1/10 the time required to write a program to perform the same transformation..."

Complete Story

Related Stories: