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):
26
#31 - Turkey Man / @lvturkeyman

11/28/2017 at 05:11PM

26
#32 - DHM / @DHM29978992

05/21/2018 at 12:43AM

26
#33 - Mihai / @mihaicristiant

03/24/2019 at 12:29PM

26
#34 - Lory / @Lory46845742

12/26/2019 at 12:50PM

26
#35 - Jean George / @JeanGeo20504212

05/18/2022 at 10:20AM

26
#36 - nickGPT / @nickandbro

08/28/2024 at 07:37PM

27
#37 - h_east (トロッコ6個) / @h_east

09/21/2012 at 08:11PM

27
#38 - Sergey Doroshenko / @dorserg

09/22/2012 at 06:55AM

27
#39 - Adit Cahya Ramadhan / @aditcr8

09/22/2012 at 10:09PM

27
#40 - Damien Chilot / @duser_2

10/06/2012 at 09:29PM

27
#41 - Corey Glynn / @albedoa

10/10/2012 at 03:10AM

27
#42 - Javier Blanco / @jbgutierrez

12/26/2012 at 06:54PM

27
#43 - Bradd Szonye / @bszonye

07/13/2013 at 01:42PM

28
#44 - Kerson Hsiao / @KersonHsiao

09/21/2012 at 06:42PM

28
#45 - Domon / @Domon

09/25/2012 at 09:07AM

28
#46 - Mathias Rav / @iaddquotes

11/13/2012 at 11:06PM

28
#47 - Nathan / @NathanHarperoni

08/05/2013 at 05:57PM

28
#48 - Hachez Floran / @FloranHachez

09/07/2013 at 08:36AM

28
#49 - Matt Green / @emgeeeeee

09/15/2013 at 04:06AM

28
#50 - Caek / @Caek_

08/18/2014 at 04:52AM

28
#51 - Matt / @mcr05

12/11/2014 at 05:11PM

28
#52 - Brandon / @Brandon10678836

08/31/2022 at 11:03PM

29
#53 - Aaron Spiegel / @spiegela

09/23/2012 at 06:16PM

29
#54 - Glen / @Glen_S

09/29/2012 at 07:17AM

29
#55 - Darcy Parker / @DarcyParker

10/15/2012 at 03:38PM

29
#56 - Bruce Woodward / @Bruce_Woodward

07/12/2013 at 11:48PM

29
#57 - Woojung Kim 김우중 / @_kimwz

07/15/2013 at 10:25AM

29
#58 - hiro / @oahiroaki

02/25/2014 at 10:05AM

29
#59 - Daniel / @Daniel00288663

04/04/2017 at 11:25AM

30
#60 - Trevor Powell / @DoomedBunnies

09/26/2012 at 05:20AM