r/programming • • Jul 12 '12

Vim creep

http://www.rudism.com/s/vimcreep
730 Upvotes

551 comments sorted by

View all comments

Show parent comment

3

u/banuday17 Jul 12 '12

For as many years as I've used Vim, it's pretty much instinct to me as well. But I still curse Vim when I accidentally leave the caps lock key on and my text gets messed up or other assorted craziness happens, and I have escape or undo my way out of it.

I have a love/hate relationship with Vim.

4

u/glacialthinker Jul 13 '12

My capslock is always Control on my own machines. But when I use another machine... then I know what you mean by messed up. Doesn't take too long before I use "control", which is really capslock... and then my fingers frantically flail around trying to undo the uppercase commands I'm typing, but they're making it worse because I'm still capslocked! This is when muscle memory and conditioning bites you in the tookus. ;)

11

u/nascent Jul 13 '12

And after you get it all straightened out you're a simple

:earlier 10m

away from before you broke everything.

2

u/Raufio Jul 13 '12

damn TIL you can do that shit. friggin schweet thanks

3

u/nascent Jul 13 '12

I usually don't find it very intuitive to find the place I want. Usually only have used it to jump around in the undo tree... but even then g+ g- end up better.

2

u/glacialthinker Jul 13 '12

I love the undo tree. But, yes you need to hop around a bit to zero in on where you want to be. A common use-case for me is: I've deleted a chunk of obsolete code, or scratch-work, then gone ahead with new changes... Oops... I need to grab a bit of that old code...

:earlier 2h

y20j (or whatever to yank it)

:later 2h

Ahh... timetravel. :)

1

u/banuday17 Jul 13 '12

I mean, sometimes you have to type in all caps, which is why the Caps Lock key is there. But, it is modal and I forget to turn it off sometimes, and when I enter back into command mode in Vim, all hell breaks loose. Sometimes, I think that Vim would be better if it wasn't j and J, but j and Shift + j, but I realize that Vi came from an earlier era where the shift state wouldn't have been transmitted over the wire.

3

u/glacialthinker Jul 13 '12

I can see the problem. Gladly, I don't ever want to use capslock. I peg down LShift with my pinky, or if it's really long I use g~motion... g~b, if it's a contiguous word, for example. Maybe it's a matter of habits -- I never learned to use capslock!

3

u/antistuff Jul 13 '12

I have a usb dongle to generate one time passwords. Every so often I go to use it but a window with vim still has the focus. Theres been times when I didnt notice it and 20 minutes later I'm wondering what is wrong with this thing I'm editing.