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 115 remaining solutions by signing in and submitting your own entry
#116 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

116 active golfers, 401 entries

Leaderboard (lowest score wins):
29
#61 - Daniel / @Daniel00288663

04/04/2017 at 11:25AM

30
#62 - Trevor Powell / @DoomedBunnies

09/26/2012 at 05:20AM

30
#63 - Anders Janmyr / @andersjanmyr

10/13/2012 at 12:59PM

30
#64 - Ram Tamtam / @ramtamtamtam

06/30/2014 at 02:29PM

30
#65 - Walker Boh / @walker_boh

11/18/2015 at 09:41AM

30
#66 - Gurukandhamoorthi / @Gurukandhamoor1

08/11/2017 at 03:48PM

30
#67 - POSIX / @po6ix

01/24/2022 at 02:06PM

30
#68 - Qing Liu / @poeminlash

10/16/2022 at 03:18PM

31
#69 - Gregor Schmidt / @schmidtwisser

09/27/2012 at 08:26AM

31
#70 - Loki, Ng Ka Long / @loki_nkl

09/28/2012 at 08:04AM

31
#71 - Piotr H / @PiotrHuk

09/28/2012 at 09:46AM

31
#72 - Einar Lielmanis / @spicausis

11/07/2012 at 05:13PM

31
#73 - a24f0600 / @a24f0600

11/30/2012 at 01:30PM

31
#74 - Alexander Gyoshev / @alex_gyoshev

10/30/2013 at 01:17PM

31
#75 - Quota / @Quotad

02/10/2014 at 03:32PM

31
#76 - r. / @rmarvie

12/20/2014 at 09:32PM

32
#77 - John Whitley / @johnwhitley

10/01/2012 at 09:53PM

32
#78 - brett / @brettyukich

09/22/2013 at 04:47AM

32
#79 - Karun Ramakrishnan / @the_karun

12/20/2013 at 09:47PM

32
#80 - Andreas Carben / @meiner_eins

09/27/2015 at 12:50PM

32
#81 - Nıklas Rıeken / @ttnick

04/20/2026 at 09:33AM

33
#82 - Thorsten Ball / @thorstenball

10/15/2012 at 11:26AM

33
#83 - Alex Klen / @alexanderklen

10/29/2012 at 07:27AM

33
#84 - Rey Wright / @reywright

11/29/2012 at 12:21AM

33
#85 - arminas / @arminas

07/11/2013 at 08:18AM

33
#86 - cj / @cj01101

08/15/2013 at 02:43PM

33
#87 - Mathieu Larouche / @matdube

11/27/2013 at 10:59PM

33
#88 - James / @Dronak

09/25/2014 at 10:52PM

33
#89 - ltn614 / @ltn614

09/25/2015 at 09:28AM

34
#90 - Tallak Tveide / @tallakt

11/01/2012 at 09:44AM