Live data from Hacker News

VimGolf.com - real Vim ninjas count every keystroke

vimgolf.com

31–40 of 86 posts

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

#32

Earlier quoted context omitted.

qq3jYpJDq@q@@ 13 Edit: I can trim one more off, to make it 12: qq3jYpJDq2@q

Awesome! You are currently the winner!

To be fair, I borrowed from a couple others here, but that was generally the approach I had in mind.

Of course, we aren't genuinely doing what the author intended. The point was not to copy-paste the line, but actually to perform what would be rather typical edits. I also was rather lucky that the file happened to be structured such that "3j" put the cursor in the right place each time.

It's also not clear whether or not the three times SHIFT must be pressed ("JD" = push and hold SHIFT = one press) should be counted as additional keystrokes.

The contest would have been better with a "tee" file and a "hole" file, stipulating that edits should be performed on the former in order to produce the latter.

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

#35
Ha, I just started working on the same exact project a few weeks ago. Great minds think alike, I guess. I'm taking a different approach, so I'll still launch it to see what people think.

I brought up this idea in a "gamification of software development" talk I gave last April.

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

#37
post #26

I had an idea for an emacs version of this. Anyone have any ideas on how you'd implement this with emacs?

My emacs-fu is pretty stale, but I'm sure it has the hooks to track what you need. Although, Emacs isn't all about keystrokes, it's more about interactive coding and an integrated development environment.

Maybe you could do something more along the lines of Perl golf, where you achieve certain things in as little code as possible.

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

#39
post #2

Where are the solutions? That's the fun thing about Perl golf is seeing how people did it in X characters. Without solutions...well, I don't see the point.

I'm logging the solutions, but in real MVP fashion... not showing them just yet. Need to bootstrap a vimscript parser first. If anyone is up for it, would love some help with the client/parser: https://github.com/igrigorik/vimgolf

MVP meaning 'Most Valuable Player'?
Post reply on HN