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

492 active golfers, 1267 entries

Leaderboard (lowest score wins):
26
#331 - Jim Infield / @jinfield

07/15/2011 at 12:01AM

26
#332 - quintin / @quintinjeannoel

08/29/2011 at 09:13PM

26
#333 - jasper110 / @jasper110

09/22/2011 at 09:55AM

26
#334 - Dave Bradford / @dbradf

10/12/2011 at 06:04PM

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

12/26/2011 at 01:52AM

26
#336 - Daniel Cohen / @danielissimo

02/12/2012 at 08:23PM

26
#337 - Drew Benedetti / @cnorsl

02/20/2012 at 05:01PM

26
#338 - Gowtham Madhava / @gowthamgowtham

07/02/2012 at 04:47PM

26
#339 - うえっち / @uh_tomo

12/04/2012 at 05:19PM

26
#340 - XGOLFER / @vimg0lfer

01/04/2013 at 04:27AM

26
#341 - Kai Yuan / @kentyuan

02/21/2013 at 05:57PM

26
#342 - Stefan Leszkiewicz / @stefanlz

03/03/2013 at 01:40AM

26
#343 - barnabaguy / @barnabaguy

03/05/2014 at 08:57PM

26
#344 - Yuval Netanel / @Yuval5555

07/27/2014 at 02:11PM

26
#345 - Patrick Pitoscia / @Patrick03960431

08/06/2014 at 02:43AM

26
#346 - Kristijan Husak / @kristijan_husak

02/02/2015 at 10:11PM

26
#347 - ɐʇnɥsɐpoʇ / @todashuta

03/26/2015 at 07:38AM

26
#348 - Hendrik Lammers / @hendriklammers

05/11/2015 at 07:05PM

26
#349 - Walker Boh / @walker_boh

10/12/2015 at 11:05AM

26
#350 - Ian Trophy / @prfrgg

02/02/2016 at 08:01AM

26
#351 - Nathan Brown / @nkabrownie

03/15/2016 at 01:16PM

26
#352 - Jeremiah Goyette / @JeremiahGoyette

08/03/2016 at 06:48AM

26
#353 - Michał Dytko / @DytkoM

12/27/2016 at 03:13PM

26
#354 - RockerZZY / @rocker_zzy

06/11/2020 at 01:24PM

27
#355 - Jonathan Wallace / @jonathanwallace

12/29/2010 at 03:41AM

27
#356 - Tom Adams / @holizz

12/29/2010 at 06:07AM

27
#357 - Barnaba Turek / @barnex

12/29/2010 at 02:23PM

27
#358 - solsTiCe d'Hiver / @solstice_dhiver

12/30/2010 at 06:21PM

27
#359 - Alain Gilbert / @alain_gilbert

12/30/2010 at 06:45PM

27
#360 - Rune Botten / @runeb

12/31/2010 at 01:17AM