Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think you are missing the elegance. The example isn't change foo to bar in f1(foo); f2(foo); f3(foo). The example is the series of steps and physical mode changes to change f(foo) to f(bar).

To do this one must select the letters foo somehow and then cause bar to be typed in their place. This can be done a number of ways in a "normal" text editor. For example, the person might double-click foo with the mouse to select the word and then type in bar. This does four things: 1. places the cursor in the location of foo; 2. select foo; 3. remove foo; 4. insert bar. In this example, there is one or two physical input context changes: from keyboard to mouse and back or maybe just from mouse to keyboard.

In vim, the physical input context never changes. The keyboard remains your context throughout. The person would 1. Position the cursor somewhere by foo (i.e. by typing a search expression like /foo<enter>); 2. type ci(<enter> which selects everything in the parenthesis, deletes and changes the context to input; 3. type bar (and probably 4. press the <esc> key).

I suspect that some people aren't bugged very much by the physical context switch and so the point of this is lost. Other people are bugged by it and struggle along until they find vi, emacs or the like.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: