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):
34
#91 - Cerborr Rizescu / @dutenpizdamatii

12/21/2015 at 04:01PM

35
#92 - Justin Knag / @justinknag

08/28/2014 at 04:41PM

35
#93 - Martin Liberg / @marreman

02/07/2015 at 06:20PM

36
#94 - Federico Bond / @federicobond

09/22/2012 at 11:07PM

36
#95 - Stephen / @StephenPek

10/03/2012 at 04:27AM

36
#96 - Rob Grijs / @robgrijs

10/15/2012 at 06:25PM

38
#97 - Patrick Klingemann / @pklingem

09/21/2012 at 06:27PM

38
#98 - Nicholas Amina / @apolatg

09/21/2012 at 07:25PM

38
#99 - S. Brent Faulkner / @sbfaulkner

10/04/2012 at 04:05AM

38
#100 - T / @tea_sea

10/09/2012 at 11:17PM

39
#101 - wilddog64 / @chengkai318

12/21/2013 at 07:18PM

39
#102 - RockerZZY / @rocker_zzy

07/05/2020 at 11:07PM

40
#103 - Phil / @ischi

12/28/2012 at 08:57AM

44
#104 - vimgolfaccfekxh / @vimgolfaccfekxh

10/20/2022 at 02:28PM

46
#105 - Nik / @mudpile45

10/04/2012 at 03:23AM

47
#106 - James Cash / @jamesnvc

09/22/2012 at 04:11PM

47
#107 - makala noble / @mnoble01

11/13/2012 at 03:46AM

49
#108 - shahanavaz m / @shahanavazm

04/08/2024 at 08:12PM

50
#109 - Jon Cairns / @joonty

10/05/2012 at 11:34AM

52
#110 - Matthew Beaumont / @mattybeau_dev

11/25/2021 at 10:52PM

53
#111 - jason_bailey / @jason_bailey

10/04/2012 at 04:20AM

70
#112 - Adam MᶜDaniel / @adamrmcd

11/16/2012 at 11:02PM

96
#113 - Underhill Labs / @underhilllabs

10/29/2012 at 02:03PM