r/programming • • Sep 24 '15

Vim Creep

http://www.norfolkwinters.com/vim-creep/
1.2k Upvotes

844 comments sorted by

View all comments

Show parent comments

21

u/Rusky Sep 25 '15

Being able to do more complex text manipulations without thinking about them lets you do more without breaking your train of thought. Faster in this case is the same thing as easier.

7

u/donalmacc Sep 25 '15

What complex text manipulation do you do on a regular basis?

I spend 90% if my time thinking, and 10% typing (at a guess) - why would I optimise that 10% - and of that 10% how much is complex text manipulation? Refactoring code should be done with semantics in mind, so text manipulation is out in that case.

1

u/kqr Sep 25 '15

If those 10% are spent moving my hand to the mouse, locating the mouse pointer on screen, manipulating the mouse pointer over to the place where I want to make an insertion, holding down the mouse button and then moving it over to where I want my insertion to end, then moving the hand to the backspace button and pressing it, only to then be able to type what I want, that is a huge context switch compared to just typing out

3kf(ct,

Of course, that key sequence makes no sense to a non-user, but it flows naturally from my muscle memory without interrupting my brain.

You can't build muscle memory for the mouse pointer, since it's located differently each time.

5

u/donalmacc Sep 25 '15

If those 10% are spent moving my hand to the mouse, locating the mouse pointer on screen, manipulating the mouse pointer over to the place where I want to make an insertion, holding down the mouse button and then moving it over to where I want my insertion to end, then moving the hand to the backspace button and pressing it

Oh come on, that's a stupid argument and you know it. What if I rephrase that is:

If those 10% are spent setting my editor to the correct mode, thinking about which finger I need to efficiently press the three key, then moving that correct finger to the three key, while I move my next finger to the k key <.....> then making my editor and brain make a context (mode) switch only to then be able to type what I want

For a start - once the text is selected you don't need to press the backspace key, you can just type.

that is a huge context switch compared to just typing out

If moving your hand 30cm to the right (or left) is a huge context switch, compared to completely changing the behaviour of the editor (changing what every button on your keyboard does in vim for instance), and you struggle with that context switch, you might want to get checked for ADHD.

Of course, that key sequence makes no sense to a non-user, but it flows naturally from my muscle memory without interrupting my brain.

And for me, using the selection method (that has been common in the vast majority of apps - web browsers, word processors, email clients) flows naturally to me.

In an "edit" operation, how much time do you spend selecting versus typing? Assuming 90% of the time is typing, and 10% of the time is making the selection, you're now down to optimising 10% of 10% of your time, when instead, by learning to touch type you would optimise 90% of your 10%.

You can't build muscle memory for the mouse pointer, since it's located differently each time.

I don't need muscle memory for my mouse pointer. As a developer, the length of time between when I hit compile and when I see the results of my code is absolutely 100% my bottleneck. at ~30 seconds between the button press and our app coming live, nothing I do other than reduce that startup time is going to improve my efficiency by more than a few nano seconds. Assuming I can save 2 seconds a day by using whatever method you're advocating, that is roughly 10 seconds a week, 480 seconds a year, which is roughly 6 hours of time over my entire career (assuming 48 weeks/yr, working for 45 years).

If I take one second off my application startup time, which I fire up maybe 20-30 times a day, (as do the other seventy developers on my project) I save more time for my employer and myself over the course of a week than I would save over my entire career. Not counting the length of time it will take me to understand what 3kf(ct, means.

What about debugging? finding call stacks of functions without running my application to figure out my chain of methods is coming from? what does vim offer me that Visual Studio doesn't give me in these cases, which is where I spend 90% of my time and can gain huge savings in time and productivity, rather than microoptimising how quickly I can select three words of a comment (oh and if that comment has a hyphen or a non-space word separator, now you have to go an re-select the text and your time saving has been lost anyway).

→ More replies (3)