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

113 active golfers, 362 entries

Leaderboard (lowest score wins):
30
#61 - Anders Janmyr / @andersjanmyr

10/13/2012 at 12:59PM

30
#62 - Ram Tamtam / @ramtamtamtam

06/30/2014 at 02:29PM

30
#63 - Walker Boh / @walker_boh

11/18/2015 at 09:41AM

30
#64 - Gurukandhamoorthi / @Gurukandhamoor1

08/11/2017 at 03:48PM

30
#65 - POSIX / @po6ix

01/24/2022 at 02:06PM

30
#66 - Qing Liu / @poeminlash

10/16/2022 at 03:18PM

31
#67 - Gregor Schmidt / @schmidtwisser

09/27/2012 at 08:26AM

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

09/28/2012 at 08:04AM

31
#69 - Piotr H / @PiotrHuk

09/28/2012 at 09:46AM

31
#70 - Einar Lielmanis / @spicausis

11/07/2012 at 05:13PM

31
#71 - a24f0600 / @a24f0600

11/30/2012 at 01:30PM

31
#72 - Alexander Gyoshev / @alex_gyoshev

10/30/2013 at 01:17PM

31
#73 - Quota / @Quotad

02/10/2014 at 03:32PM

31
#74 - r. / @rmarvie

12/20/2014 at 09:32PM

32
#75 - John Whitley / @johnwhitley

10/01/2012 at 09:53PM

32
#76 - brett / @brettyukich

09/22/2013 at 04:47AM

32
#77 - Karun Ramakrishnan / @the_karun

12/20/2013 at 09:47PM

32
#78 - Andreas Carben / @meiner_eins

09/27/2015 at 12:50PM

33
#79 - Thorsten Ball / @thorstenball

10/15/2012 at 11:26AM

33
#80 - Alex Klen / @alexanderklen

10/29/2012 at 07:27AM

33
#81 - Rey Wright / @reywright

11/29/2012 at 12:21AM

33
#82 - arminas / @arminas

07/11/2013 at 08:18AM

33
#83 - cj / @cj01101

08/15/2013 at 02:43PM

33
#84 - Mathieu Larouche / @matdube

11/27/2013 at 10:59PM

33
#85 - James / @Dronak

09/25/2014 at 10:52PM

33
#86 - ltn614 / @ltn614

09/25/2015 at 09:28AM

34
#87 - Tallak Tveide / @tallakt

11/01/2012 at 09:44AM

34
#88 - Oliver Christ / @0liverChrist

09/27/2013 at 10:40PM

34
#89 - Milind Ganjoo / @mganjoo

01/22/2014 at 04:56AM

34
#90 - Brian / @wyantb_reader

06/26/2014 at 02:54AM