Also, not having to move away from the home row makes me feel much faster. Having to use Alt/Control/Arrows makes me cry. (I know you can't avoid Control in Vim, but in this example it is not required.)
ci"baz<esc> is 7 keystrokes, only one of which is a jump.
<ctl-F>bar<esc>baz is 8 strokes and two jumps. It also requires typing the entire string in quotes. If the example were
var foo = "The quick brown fox jumps over the lazy dog";
The vim example would not change but yours would.
I'm not trying to be an a-hole, use what you like, I'm just saying, that for me the attraction to vim is the strive toward the minimization of keystrokes, especially ones that require me to move my hands.
However, if I was actually faced with this problem, I'd use End, Ctrl + Left, Ctrl + D, baz, which is a total of 7 keystrokes. (if you don't release Ctrl)
The vim example was 8 keystrokes. (" is shift + ') I have no doubt that you could manufacture an example that shows a benefit for vim, but I think that the advantages are overestimated by heavy vim users.
Edit: Your longer string example is a good example of a task that's more efficient in vim.
In his example, what is more important is that you are 'describing' what you want to do with text with commands.
So when you have
var foo1 = "bar";
var foo2 = "hello hi";
var foo3 = "when and why";
You can use the same command [cib"] to change the value assigned to foo1/foo2/foo3. You are describing your change semantically i.e. I want to change word inside the double quotes.
In Sublime and other editors, it matters what the assignment is and you have to use different approach in each scenario.
Frankly, as I type at 70wpm, I don't care about saving a few keystroke here and there.
Gives back a list of interesting people.
Not that I think it matters if you use Vim or anything particular for that matter.
Also, let's not confuse techniques with tools. It is unfortunate that, other than modal editing which is too generic, we don't have a name for Vi-style editing which does not involve Vi, so people confuse Vi-style editing (e.g. the technique), with Vi (e.g. the tool). The tool may have its own shortcomings which render it unsuitable.
i think it's easier to grab the mouse, dlb click bar, foo
with vim, it's still easier than grabbing the mouse. that's the litmus test of text editor interface effectiveness. the mouse is awesome, hard to beat. so if your editor beats it, game on!
<cmd>-<right>, <option-left>, <option-shift-right>, baz
And considering you didn't have to press <mode>: beforehand, it can be just as fast.
I'm a vim user, but using it for something like Objective-C in place of the wonderful autocomplete in Xcode would be a totally dumb thing to do. It's simply not smart enough to improve my productivity, even with the slight speed increases with text-manipulation.
edit: link - https://github.com/JugglerShu/XVim
The same holds true for Sublime Text. Instead of using the arrow keys, you could do any of the following:
Ctrl+H : Replace
bar : Find what
baz : Replace with
Ctrl+Shift+H : Replace first match
<esc> : Exit replace mode
or Ctrl + I : Incremental Find (finds and selects finding)
bar : Find & select text
baz : Overwrite selection
or Ctrl+<Right>+<Right>+<Right>+<Right> : Reach the word bar
Ctrl+d : Select word under cursor
baz : Overwrite selection
or Ctrl+P : GoTo Anything
# : Goto word
bar : Goto word 'bar' & select it
baz : Overwrite selection
I agree that vim's vocabulary is very expressive and very powerfull. I switched to Sublime Text because tweaking vim to meet my needs was just too much effort, even for simple things. Couple this with even more effort to make it play nice with Greek (my native language), and the switch came naturally. f"ci"baz
In vim you don't just move around with arrows, then delete and then replace the text you want. What happens is you can use noun-verb associations to do things.
For example on a line like this:
I could be at the beginning of the line and type the following keys to change the inside of the quotation marks: In sublime I would do the following: The difference between the two was an epiphany for me. In vim I could actually use verbs and nouns to determine how I will edit the text in front of me. I now have a language that I can use to edit text rather than editing the text using the most manual of tools and the verbs and nouns combination are only limited by my imagination and the plugins I install.