Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 505cb13a52512d000200002b

you're stuck on jQuery < 1.7

replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`

Start file
    $('li.assessment_question').on('click', 'a.add_question_addendum', @openQuestionAddendumForm)
    $('li.assessment_question').on('click', 'a.cancel_question_addendum', @cancelQuestionAddendum)
    $('li.assessment_question').on('ajax:beforeSend', 'form.question_addendum_form', @hideFormEnableAddAddendumLink)
    $('li.assessment_question').on('ajax:success', 'form.question_addendum_form', @appendQuestionAddendum)
End file
    $('a.add_question_addendum').bind('click', @openQuestionAddendumForm)
    $('a.cancel_question_addendum').bind('click', @cancelQuestionAddendum)
    $('form.question_addendum_form').bind('ajax:beforeSend', @hideFormEnableAddAddendumLink)
    $('form.question_addendum_form').bind('ajax:success', @appendQuestionAddendum)

View Diff

1,4c1,4
<     $('li.assessment_question').on('click', 'a.add_question_addendum', @openQuestionAddendumForm)
<     $('li.assessment_question').on('click', 'a.cancel_question_addendum', @cancelQuestionAddendum)
<     $('li.assessment_question').on('ajax:beforeSend', 'form.question_addendum_form', @hideFormEnableAddAddendumLink)
<     $('li.assessment_question').on('ajax:success', 'form.question_addendum_form', @appendQuestionAddendum)
---
>     $('a.add_question_addendum').bind('click', @openQuestionAddendumForm)
>     $('a.cancel_question_addendum').bind('click', @cancelQuestionAddendum)
>     $('form.question_addendum_form').bind('ajax:beforeSend', @hideFormEnableAddAddendumLink)
>     $('form.question_addendum_form').bind('ajax:success', @appendQuestionAddendum)

Solutions

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 101 remaining solutions by signing in and submitting your own entry
#102 Underhill Labs / @underhilllabs - Score: 96 - 10/29/12 @ 14:03
Wda'^<Right><Right>P<Down>Wda'^<Right><Right>P<Right>da'<Up><Left><Left><Left>da'<Down><Down>Wda'^<Right><Right>P<Right>da'<Down>Wda'^<Right><Right>P<Right>da':%s/\.on/.bind/<CR>gg<Right><Right>x<Down>x<Down>x<Down>x:%s/,,/,/<CR>:wq<CR>

0 comments


Created by: @pklingem

102 active golfers, 317 entries

Leaderboard (lowest score wins):
38
#91 - Nicholas Amina / @apolatg

09/21/2012 at 07:25PM

38
#92 - S. Brent Faulkner / @sbfaulkner

10/04/2012 at 04:05AM

38
#93 - Tom Cammann / @tea_sea

10/09/2012 at 11:17PM

39
#94 - wilddog64 / @chengkai318

12/21/2013 at 07:18PM

40
#95 - Phil / @ischi

12/28/2012 at 08:57AM

46
#96 - Nik / @mudpile45

10/04/2012 at 03:23AM

47
#97 - James Cash / @jamesnvc

09/22/2012 at 04:11PM

47
#98 - makala noble / @mnoble01

11/13/2012 at 03:46AM

50
#99 - Jon Cairns / @joonty

10/05/2012 at 11:34AM

53
#100 - jason_bailey / @jason_bailey

10/04/2012 at 04:20AM

70
#101 - Adam MᶜDaniel / @adamrmcd

11/16/2012 at 11:02PM

96
#102 - Underhill Labs / @underhilllabs

10/29/2012 at 02:03PM