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 4d1a71b5b8cb340932000109

Change the content of a string

This docstring is a complete lie. Fix it.

Start file
def add(a, b):
    """ Subtracts "x" from "y" """
    return a + b
End file
def add(a, b):
    """ Adds "a" to "b" """
    return a + b

View Diff

2c2
<     """ Subtracts "x" from "y" """
---
>     """ Adds "a" to "b" """

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 488 remaining solutions by signing in and submitting your own entry
#489 Frank Hui / @frankhui - Score: 69 - 12/29/10 @ 06:44
:1,$ s/Subtracts/Adds/<CR>:1,$ s/x/a/<CR>:1,$ s/from/to/<CR>:1,$ s/y/b/<CR>:w<CR>:q<CR>

0 comments


Created by: @wolever

489 active golfers, 1260 entries

Leaderboard (lowest score wins):
27
#361 - Dezső Zoltán / @zakiazigazi

01/22/2011 at 08:05AM

27
#362 - Matthieu Honel / @ocus

01/28/2011 at 05:03PM

27
#363 - Jeroen / @teranex

03/04/2011 at 12:31AM

27
#364 - Mike Marion / @mikejmarion

03/22/2011 at 07:12AM

27
#365 - Ilya Strukov / @i1ey

05/01/2011 at 05:58PM

27
#366 - Mikhail Korepanov / @PanyaKor

06/13/2011 at 03:22PM

27
#367 - Dave / @zzdave13

07/15/2011 at 01:14PM

27
#368 - Aaron Kalin / @martinisoft

09/16/2011 at 01:16AM

27
#369 - erktime / @erktime

09/16/2011 at 01:18AM

27
#370 - palentine / @palentine

12/12/2011 at 07:39PM

27
#371 - ümit kablan / @udslk

03/11/2012 at 02:11PM

27
#372 - Nolen Royalty / @NolenRoyalty

04/21/2012 at 02:52AM

27
#373 - Yusuke Tsutsumi / @tsutsumiyusuke

05/03/2012 at 12:15AM

27
#374 - Tomas Frostensson / @frostensson

05/22/2012 at 02:47PM

27
#375 - Jake Bell / @theunravelr

05/23/2012 at 04:48PM

27
#376 - Chris Brown / @engineercyb

07/13/2012 at 03:32AM

27
#377 - mlu / @_mlu

07/27/2012 at 07:18AM

27
#378 - Kevin McGladdery / @run_kmc

08/12/2012 at 08:39PM

27
#379 - Dmitry Olyenyov / @Dmitry_Olyenyov

08/22/2012 at 10:46AM

27
#380 - vansan / @VinceVansan

08/23/2012 at 09:26PM

27
#381 - Arto Vuori / @dhpe

08/30/2012 at 08:08PM

27
#382 - Nicolas Friedli / @NicolasFriedli

10/29/2012 at 05:26PM

27
#383 - sathish316 / @sathish316

11/18/2012 at 05:48PM

27
#384 - Ilya Loginov / @_zerone_

02/24/2013 at 10:14PM

27
#385 - くま ก็็็็็็็็็็็็็ʕ•͡ᴥ•ʔ ก้้้้้้้้้้้ 55 / @kumack55

04/03/2013 at 02:42PM

27
#386 - Aaron Josephs / @aaronjosephs1

05/01/2013 at 10:39PM

27
#387 - Kathryn / @hartknyx

05/21/2013 at 05:08AM

27
#388 - Woojung Kim 김우중 / @_kimwz

07/13/2013 at 12:21AM

27
#389 - A / @Tower_1980

07/29/2013 at 01:47PM

27
#390 - James / @Dronak

08/29/2013 at 03:52PM