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

577 active golfers, 1541 entries

Leaderboard (lowest score wins):
23
#241 - Marian Schubert / @MarianSchubert

01/08/2011 at 08:47PM

23
#242 - joshi / @VimFu

01/10/2011 at 07:42PM

23
#243 - Clive Evans / @swish_bob

01/17/2011 at 11:40PM

23
#244 - Andrey A. Ugolnik / @andreyugolnik

01/19/2011 at 10:53PM

23
#245 - Eivind Jahren / @HaskellElephant

02/02/2011 at 08:55PM

23
#246 - Ruy Diaz / @diazruy

03/20/2011 at 01:43AM

23
#247 - Sebastian Morr / @blinry

04/28/2011 at 08:27PM

23
#248 - mightyfoo / @mightyfoo

05/25/2011 at 02:22PM

23
#249 - Omar Ramos / @_omarramos

06/04/2011 at 05:25PM

23
#250 - Øystein Walle / @oysteinwalle

07/10/2011 at 01:35AM

23
#251 - pet_rock / @pet_rock

07/27/2011 at 02:15AM

23
#252 - sjatkinson / @sjatkinson

08/31/2011 at 03:29AM

23
#253 - nicolas bo / @thevegeta

11/09/2011 at 01:01PM

23
#254 - Benjamin Sullivan / @benjaminsull

12/06/2011 at 05:16PM

23
#255 - Dj Vimgolf / @dj_vimgolf

12/31/2011 at 01:51AM

23
#256 - Ashley Feniello / @AshleyFen

01/29/2012 at 05:35AM

23
#257 - Jyun-Fan Tsai / @fakecolor

02/04/2012 at 01:13PM

23
#258 - drupalovereasy / @drupalovereasy

04/27/2012 at 03:11AM

23
#259 - Daniel Lundin / @danielundin

05/10/2012 at 12:09PM

23
#260 - OMF / @exolon

05/29/2012 at 10:58PM

23
#261 - Benoit Thiell / @benoitthiell

07/19/2012 at 09:35PM

23
#262 - Andrey Yankin / @YankinAndrey

07/20/2012 at 11:04AM

23
#263 - Dan Oneata / @DanOneata

08/07/2012 at 07:01AM

23
#264 - Stephen Fiorelli / @sfiorell2

08/21/2012 at 08:18PM

23
#265 - Darcy Parker / @DarcyParker

10/17/2012 at 01:24PM

23
#266 - André / @Joschasa

12/24/2012 at 09:38PM

23
#267 - Claes Mogren / @claesmogren

03/23/2013 at 07:43PM

23
#268 - Brent Carmer / @brent_carmer

04/09/2013 at 01:44AM

23
#269 - RobertT / @techrt2050

07/10/2013 at 02:10AM

23
#270 - Dom Armstrong / @dom_cycleface

08/26/2013 at 09:15AM