A lot of people here have made the point that vim has a steep learning curve that eventually pays off, which, to me implies that intuitiveness is either lacking or besides the point. Still, I agree with your other points. I'm thinking of going back to it to minimize hand strain.
If I learn the new verb c, which deletes and puts me in insert mode, I already know that I can type c3w to change 3 words, or ci" to change the phrase inside quotation marks.
Because all verbs work on the same set of nouns and adjectives I can intuitively know what many commands do - even though I've never tried them - as long as I understand the parts that make up the command.
I think the steep learning curve comes from the need to learn a richer and more precise way of editing, while you may be used to get by with a sloppy one. I had a similar experience when I switched to the Dvorak keyboard: I learned for the first time how to touch-type, while the Qwerty grew on me from hunt-and-peck.
Since you are considering about going back, here are some useful custom mappings of mine: - swap p and P; - map Space as PageDown; - map Shift + Space as PageUp; The last two mirror the way most document-displaying applications work. Generally, don't think twice about remapping some commands either to correct historical quirks of Vim or make it behave consistently with other applications you may be using, hence lowering your memory load.
Have fun
Change forward word is in a mainstream editor: [Shift]+[Ctrl]+[Right]
Change line: Home, [Shift]+[End]
...and so on...
Moreover you forgot to mention that you always need to switch modes...
Mainstream editors are pretty efficient, unfortunately in the UNIX World there are hardly any good ones. The best ones I can think of are Eclipse and gedit.
Unfortunately there is no Notepad++-like thing on UNIX. (And Kate just became messy and buggy when KDE4 came out.)
BTW: Has any vim fan ever used the refactoring feature in Eclipse? Or edited Code during runtime using the Graphical Debugger? I doubt it... ;-)
I stand corrected.
> Change line: Home, [Shift]+[End]
Here there is a translation at work: the editor lacks an atomic "change line" command, so users resort to "move cursor to the beginning of line, then select text up to the end of the line", which is something you could do in Vim, too, if you wanted.
> Moreover you forgot to mention that you always need to switch modes...
I don't understand. Do you mean you have to switch between Insert and Normal mode? If so, this is where newbies - including me some years ago - make their bigger mistake: you don't linger in Insert mode, you hit Esc as soon as you end entering text. Either you are typing text, or you are in Normal mode. This is the reason you need the Esc key as easily accessible as possible. On my keyboard, it is on the Caps Lock key. And : is unshifted.
> BTW: Has any vim fan ever used the refactoring feature in Eclipse? Or edited Code during runtime using the Graphical Debugger? I doubt it... ;-)
I'm with you on this. Still, people confuse Vi-style editing with either Vim or other Vi clones. Vi-style editing is neither Vi nor Vim nor Elvis nor [name an editor]. I used Eclipse and Visual Studio, yes, and guess what: I had Vi-style-editing plugins on both. What people call "the best of both worlds".
EDIT: Vi-style editing rocks at editing text, which is a subset - or not the same - of editing code. A user editing code with a mainstream editor offering powerful code-completion and refactoring facilities may have at her disposal a more powerful tool than a user editing code with a Vi-style editor lacking such facilities.
And yes, vi(m) is inferior to much less sophisticated editors when it comes to juggling large chunks of code. Or maybe not...
Anyways, now that I have a Macbook, I need to learn vim because it lacks all the cool keys you have on a PC keyboard :D At least I'm now using at nearly as productively as gedit or the like. (On average)
BTW: This caps-look trick is awesome, I'll set it up now!
Intuitive: most commands resemble natural language, without awkward or arbitrary mappings. For instance:
- w: (forward) word;
- cw: change (forward) word;
- c2w: change 2 (forward) words;
- 2cw: twice change word;
- ciw: change inner word;
There is no intervening translation. For instance, to change a word in mainstream editors, you delete it first, then start entering the new text. In Vim, it's one command: you think "change forward word", you issue the "change forward word" command.
Consistent. For instance, double letters work on lines:
- cc: change line;
- dd: delete line;
- yy: yank line;
and capital letters work till the end of the line:
- C: change till the end of the line;
- D: delete till the end of the line;
- Y: yank till the end of the line (not so in vanilla Vim, but I've remapped it because consistency matters to me).
Modular: you compose commands. For instance, / is the search command and then:
- d/testo: delete until the next occurrence of "testo";
- c/testo: change until the next occurrence of "testo";
- etc.
Comfortable: limited usage of modifier keys. Vim saved me from RSI.
Portable: letters and Shift keys are in the same position on any keyboard, be it on a desktop, a laptop, etc. whilst each laptop manufactures has its own idea about where Control, Alt, Arrows, PageUp and PageDown should be.
Hope this helps.