News for hackers. Stuff that matters.
Re:Vim GIFs by aninhumer on Tuesday July 19, 2016 @06:59PM (#12125591)
Of course, if you expand every input out to a full line, it's going to look worse than a string of keypresses. However if we compare more fairly:

vim: 2YjjpVj:s/foo/bar/pg

Sublime: ^L^L^C↓↓^V↓^Ffoo<Esc>^Dbar

(This assumes there are only 2 instances of "foo", but you'd just have to press ^D a few more times otherwise.)

And sure moving your hand to ↓ takes slightly more time, but it's still no where near as bad as your screed makes out. And if you really care, you can make new shortcuts for movement (by editing a simple JSON file).

Personally, my experience is of using vim for several years, and then becoming approximately as proficient in Sublime in a matter of weeks, and then much more productive in a matter of months. And sure, I wasn't putting that much effort into learning vim, but then, I wasn't putting that much effort into learning Sublime either.

Re:Vim GIFs by flukus on Tuesday July 19, 2016 @11:22PM (#12126650)
>Of course, if you expand every input out to a full line, it's going to look worse than a string of keypresses. However if we compare more fairly:

Expanding them into new lines outlines the time spent though. ^L is no where near as fast as 2Y.

Re:Vim GIFs by drewgross on Tuesday July 19, 2016 @11:56PM (#12126786)
I would say it's faster since with 2Y you have to lift your finger off the 2 before you can press the Y, but with ^L you leave your finger on the ^ while you press the L so it doesn't even really count as 2 full key strokes. (not to mention you have to press ESC half the time in Vim to even get to the mode where "2" is what you want to do)
Re:Vim GIFs by flukus on Wednesday July 20, 2016 @12:23AM (#12126889)
You're right, I completely misread the post I replied to.

A minor nitpick though, in vim you aren't pressing escape to get to that mode, it's the normal mode, it's where you should always be.

Re:Vim GIFs by drewgross on Wednesday July 20, 2016 @03:46AM (#12127446)
I usually use Sublime but when I'm ssh'ed to a machine I use vim, so I have some experience. I find that I need to exit insert mode to run commands about half the time, or maybe a little less than half the time, in order to run commands. Maybe thats just due to the type of thing I usually edit though. I don't have enough vim foo to know how to do this, but maybe you do: can you record a session and see how often you pressed escape? I'd be interested to know how often various people press escape.
Re:Vim GIFs by flukus on Wednesday July 20, 2016 @07:33PM (#12133397)
We press escape a lot, many even map it to something more convenient like caps.

The point I was making though is that with vim you don't exit insert mode to run commands, you enter insert mode to write text and then immediately exit to normal mode.

It may sound pedantic, but it's a core part of understanding vim. Insert mode is the mode you should spend very little time in.

Re:Vim GIFs by aninhumer on Wednesday July 20, 2016 @04:12AM (#12127529)
I suspect vim users don't notice because they instinctively press Esc as soon as they're done using insert mode, so they don't think of that as part of the next command. And I think that's fair tbh, it's just something your fingers do while you're thinking about what to do next.