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

520 active golfers, 1346 entries

Leaderboard (lowest score wins):
26
#331 - Todd Dombrowski / @tdombrowski

12/29/2010 at 12:07AM

26
#332 - Steven Grady / @steven807

12/29/2010 at 01:07AM

26
#333 - omelo / @omelo

12/29/2010 at 08:46AM

26
#334 - Leonard Chin / @lchin

12/29/2010 at 10:42AM

26
#335 - Indrek Juhkam / @indrekj

12/29/2010 at 11:52AM

26
#336 - Adam Pohorecki / @apohorecki

12/29/2010 at 02:16PM

26
#337 -  Ikhsan Maulana / @ixandidu

12/30/2010 at 11:03AM

26
#338 - Denis Odorcic / @denisodorcic

12/30/2010 at 08:25PM

26
#339 - Jim Garvin / @coderifous

12/30/2010 at 09:10PM

26
#340 - Sam Nardoni / @samnardoni

12/31/2010 at 12:26AM

26
#341 - clint tseng / @cxlt

01/02/2011 at 06:39AM

26
#342 - Stuart Gale / @bishboria

01/02/2011 at 04:54PM

26
#343 - bing_twic / @bing_twic

03/09/2011 at 07:33PM

26
#344 - Craig H. Anderson / @CootCraig

04/19/2011 at 09:06PM

26
#345 - Jean-Christophe Cyr / @jccyr01

05/28/2011 at 02:00AM

26
#346 - Rolf K. / @mindleftbody

06/17/2011 at 12:59PM

26
#347 - Jim Infield / @jinfield

07/15/2011 at 12:01AM

26
#348 - quintin / @quintinjeannoel

08/29/2011 at 09:13PM

26
#349 - jasper110 / @jasper110

09/22/2011 at 09:55AM

26
#350 - Dave Bradford / @dbradf

10/12/2011 at 06:04PM

26
#351 - Jaime A. Sánchez / @jashbeta

12/26/2011 at 01:52AM

26
#352 - Daniel Cohen / @danielissimo

02/12/2012 at 08:23PM

26
#353 - Drew Benedetti / @cnorsl

02/20/2012 at 05:01PM

26
#354 - Gowtham Madhava / @gowthamgowtham

07/02/2012 at 04:47PM

26
#355 - うえっち / @uh_tomo

12/04/2012 at 05:19PM

26
#356 - XGOLFER / @vimg0lfer

01/04/2013 at 04:27AM

26
#357 - Kai Yuan / @kentyuan

02/21/2013 at 05:57PM

26
#358 - Stefan Leszkiewicz / @stefanlz

03/03/2013 at 01:40AM

26
#359 - barnabaguy / @barnabaguy

03/05/2014 at 08:57PM

26
#360 - Yuval Netanel / @Yuval5555

07/27/2014 at 02:11PM