Live data from Hacker News

VimGolf.com - real Vim ninjas count every keystroke

vimgolf.com

61–70 of 86 posts

Re: VimGolf.com - real Vim ninjas count every keystroke

#61
post #59

You can also use Vi for hundreds of challenges at http://golf.shinh.org alot of the newer challenges are stale but some of the older ones are gold.

Different game, that's counting the resulting code that you create. This is counting the number of keystrokes to create the code (for some at least).

Re: VimGolf.com - real Vim ninjas count every keystroke

#66
This awesomeness unexpectedly sucked away half my afternoon. Not really sure whether to be upset about it our not. :)

Only thing is that the key counting doesn't seem to be consistent. :\ Using the command history seems to really, really screw with the counts. I thought it counted up all the characters in the submitted command, but this doesn't seem to be the case. I submitted an 18 for the "Sort and add attributes" challenge, then realized that the text for the new key is longer than that. :\

I'm not really clear on what "counts" as a keypress (shift key? colon for commands? Paste commands? Esc?) and I haven't been able to get any of my "scores" to match up with the count in my head.

All that aside, this is a barrel of fun, and I'm sure these kinks will get worked out.

Re: VimGolf.com - real Vim ninjas count every keystroke

#67
post #8

I want to go head to head with someone in match play.

DJ Hero has a great feature where after you beat a song, you can "Challenge a friend" and it sends a message to them that says something along the lines of "Steve just scored 200,000 points on $SONG_NAME. Can you do better? OK/CANCEL/ABORT"

Re: VimGolf.com - real Vim ninjas count every keystroke

#68

This awesomeness unexpectedly sucked away half my afternoon. Not really sure whether to be upset about it our not. :) Only thing is that the key counting doesn't seem to be consistent. :\ Using the command history seems to really, really screw with the counts. I thought it counted up all the characters in the submitted command, but this doesn't seem to be the case. I submitted an 18 for the "Sort and add attributes"…

Also, it would be awesome if I could delete some of my scores. :\ My bogus win and early attempts are cluttering up the leaderboard.

Re: VimGolf.com - real Vim ninjas count every keystroke

#69
post #60

FizzBuzz: (score: 71) i1^] qaYp CTRL+a q98@aggjjqaA Fizz^] 3jq32@agg:5 ENTER qaA Buzz^] 5jq19@a:%s/z B/zB/ ENTER ZZ

You don't need the "gg" (move to top) before ":5" (go to line 5)

Right, I'm an idiot. Good catch - likewise the ggjj earlier can just be :3[enter]

Re: VimGolf.com - real Vim ninjas count every keystroke

#70
post #16

Earlier quoted context omitted.

qa/v yypjddq@a@a 16 :P

If this contest also rated by finger distance (one of vim's strengths), I'd propose qq and @q@@ instead of using the "a" register.

Agreed. I'm surprised by all the "qa"s I'm seeing. I've always used "qq" for quick macros and kind of assumed everyone else did as well. It's especially convenient considering that @ and q are right next to each other on a qwerty layout.
Post reply on HN