Alright, before making decision I actually did some evaluation of ViEmu in context of my typical code editing patterns. As you see from the title the result was negative.
Before I begin trolling Vi let's review my normal editing habits (w/o ViEmu)
I use left Shift and Ctrl exclusively, with my left thumb usually not far from left Ctrl and my left ring finger near left Shift.
I use numeric keyboard for navigation. I know most people have NumLock On most of the time which I find totally wrong! Numeric keyboard is much better than "normal" arrow keys as it gives you more convenient access to Home and End with your index finger, Insert with you thumb, Delete with ring finger and Enter with your pinky while still keeping PgUp/PgDn at your ring finger's reach.
If I happen to work with bigger document and I still have my hand on the mouse after opening new file from Solution Explorer I use the mouse to quickly get where I need to be, otherwise I just Page, Home/End and Ctrl+Arrow to make my way to the place of attention. Once I'm there I either End-Enter (using numeric keypad) to add a new line or I edit the current line with Ctrl+Shift+Arrows/Home/End followed by Ctrl+Ins, Shift+Ins and Shift+Del for clipboard operations and Ctrl+Z for Undo.
Sometimes, but not often, I scroll with Ctrl+Up/Down just to keep my working area in the middle of the screen without interrupting the edit burst. I also do Home-Ctrl+Shift+End followed by Ctrl+Left if I want to cut a sequence of words ending closer to the end of the line.
These plus an occasional Alt+Enter to apply Resharper's suggestion is how I spend most of my (non-typing) editing time. Perhaps you should also know that I'm not a touch-typist. I do blind type but I only use index and middle fingers, plus pinkies for left Shift and Return.
This should make it very clear why I found ViEmu pretty pointless even after I memorized most of commands. Indeed, to draw Vi parallels to my editing habits, the most useful commands would be:
- Ctrl+F/B to page -- extra Ctrl
- j and k to move down and up
- w and b to quickly move sidewise -- less Ctrl -- (using an occasional W or B to skip to the next space -- extra Shift)
- x and X to delete
- vwww....w or vbbbb.....b followed by y, c or shift+P to copy, cut or replace a sequence of words -- less Ctrl+Shift to begin but extra Shift to Paste before cursor
- u to Undo -- less Ctrl
- o to add new line -- less End
- zz to center the screen on the current line -- much faster as this gets me centered in N(0) time regardless of how far I am from the center
- cc to cut entire line - much faster than Home-Ctrl+Shift+End-Del sequence I sometimes use
Of these only the nice-to-have zz and not-so-frequently-used cc are much faster and most others only eliminate a single Ctrl press, while still requiring me to press Esc to return to the Command mode after each edit. Now these saved Controls don't actually save much since as I said I'm not a touch typist so my hands still need to move significant distance to press all these Js, Ks and Us.
Truth be told, there are many unique commands in Vi that don't have "normal" counterparts but I just don't see a need to use them as often as Vi zealots seem to suggest I'm supposed to. Let's see.
- cib - cut (text + text = text)
- ci" - cut "text, text; and text!"
- cW - cut to next space
- f( - move to next (
- % - move to the matching bracket
- * - move to next occurance of this word
- . - repeat last edit sequence
These are nice but arguably not worth the effort, especially in comparison with following Resharper shortcuts:
- Ctrl+W - expand selection
- Alt+Up/Down - go to next/previous method
- Ctrl+Shift+Alt+Up/Down - move current block up or down
- Ctrl+] - go to matching bracket
- Ctrl+Shift+F7 to highlight all usages of current identifier followed by Ctrl+Alt+Up/Down to jump the usages
- Ctrl+B - go to declaration
Note that most useful of these are semantic movements. I.e. they rely on background compilation of the text being edited as opposed to simple pattern match. This is not to mention Resharper's perfect refactorings like F2 to rename etc.
Don't know about you but I'm sold. Long live Resharper! Goodbye ViEmu!
Tags: