Live data from Hacker News

Vim clutch

github.com

91–100 of 227 posts

Re: Vim clutch

#91
post #65

I don't know how this would work out ergonomically. My dad is a cab driver and he often complains that pressing the clutch with his foot often giving him RSI kind of pain. But however I think this is purely subjective. From an experiment perspective, this is really cool! And this generally qualifies into what could one call a 'real hack'. This has a air of freshness to it. Now the real power of vim is in getting into…

You can start thinking in vim by reading this answer on stack overflow: http://stackoverflow.com/a/1220118 Moving word wise,(w,e) is used a lot. Next occurrence of word under cursor is useful. *,# Learning effective macros is extremely useful. di" is one of my favorite commands. Delete everything inside the quotes not including the quotes. Put inoremap jj into your .vimrc so that you can press jj quickly in insert mo…

di" is one of my favorite commands. Delete everything inside the quotes not including the quotes.

You usually want to replace what's inside the quotes, so hence use ci"

cit is pretty nice for replacing a tag's inner html. And of course this works with parentheses - ci( - and brackets - ci[ - and curly braces and single quotes and angle brackets.. I love vim :)

Re: Vim clutch

#93
post #20

The escape bit would work great, but there are so many other ways to enter insert mode apart from i that I'm not sure how useful it would wind up being.

That's what I was thinking as well. I really don't enter insert mode using i very often at all. Fun project, but I don't think it would actually be productive to use.

Re: Vim clutch

#95
post #65

I don't know how this would work out ergonomically. My dad is a cab driver and he often complains that pressing the clutch with his foot often giving him RSI kind of pain. But however I think this is purely subjective. From an experiment perspective, this is really cool! And this generally qualifies into what could one call a 'real hack'. This has a air of freshness to it. Now the real power of vim is in getting into…

You have to learn h,j,k,l are not just navigational keys but also can be combined with multipliers like 20h(Moves 20 positions to the left).

You know, I've understood this for a while, but to this day I still don't use it.

I can't count characters that fast! If you're going to lean forward and count out chars, you might as well count them out with presses of 'h'.

Re: Vim clutch

#96
post #65

I don't know how this would work out ergonomically. My dad is a cab driver and he often complains that pressing the clutch with his foot often giving him RSI kind of pain. But however I think this is purely subjective. From an experiment perspective, this is really cool! And this generally qualifies into what could one call a 'real hack'. This has a air of freshness to it. Now the real power of vim is in getting into…

Please read the author's introduction: "An Introduction to Display Editing with Vi" http://www.verticalsysadmin.com/vi/vi_editor__bill_joy.pdf

I also recommend the O'Reilly "Learning the vi and vim editors" book, http://shop.oreilly.com/product/9780596529833.do and my own course on vi basics, http://www.verticalsysadmin.com/vi.htm

Re: Vim clutch

#98

I did this a few months ago: imap kj I have never had to type a word with the letter combination 'kj' in it. Works great.

Until you use kj as a variable for KillJoy

Re: Vim clutch

#99
post #28

Earlier quoted context omitted.

Because you don't have to hit escape or jj to exit out. You just let your foot off the pedal. No chance of accidentally being in edit mode or not.

You can use Ctrl + [ instead which is easier...

This reminds me of my friend's father who decided to learn programming later in his life and signed up for a class. Incredulously, their language of choice of Perl, and so not two weeks later he comes back from a class and shows a handout that says:

     slkjs/sdfjks/\1jksok/j23kjdj\skjd

   is the same as 

     lkkd\kk////?!@

   except latter is shorter and easier to understand
The note was actually correct and the actual expressions made sense, but to an average person both looked like a line noise. Needless to say it was his last class.

Re: Vim clutch

#100
Once you used to it the feet will have Vim muscle memory, I wonder how it would effect one's driving especially with the manual gear shifts cars (pun intended :) )
Post reply on HN