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

634 active golfers, 1732 entries

Leaderboard (lowest score wins):
26
#421 - Indrek Juhkam / @indrekj

12/29/2010 at 11:52AM

26
#422 - Adam Pohorecki / @apohorecki

12/29/2010 at 02:16PM

26
#423 -  Ikhsan Maulana / @ixandidu

12/30/2010 at 11:03AM

26
#424 - Denis Odorcic / @denisodorcic

12/30/2010 at 08:25PM

26
#425 - Jim Garvin / @coderifous

12/30/2010 at 09:10PM

26
#426 - Sam Nardoni / @samnardoni

12/31/2010 at 12:26AM

26
#427 - clint tseng / @cxlt

01/02/2011 at 06:39AM

26
#428 - Stuart Gale / @bishboria

01/02/2011 at 04:54PM

26
#429 - bing_twic / @bing_twic

03/09/2011 at 07:33PM

26
#430 - Craig H. Anderson / @CootCraig

04/19/2011 at 09:06PM

26
#431 - Jean-Christophe Cyr / @jccyr01

05/28/2011 at 02:00AM

26
#432 - Rolf K. / @mindleftbody

06/17/2011 at 12:59PM

26
#433 - Jim Infield / @jinfield

07/15/2011 at 12:01AM

26
#434 - quintin / @quintinjeannoel

08/29/2011 at 09:13PM

26
#435 - jasper110 / @jasper110

09/22/2011 at 09:55AM

26
#436 - Dave Bradford / @dbradf

10/12/2011 at 06:04PM

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

12/26/2011 at 01:52AM

26
#438 - Daniel Cohen / @danielissimo

02/12/2012 at 08:23PM

26
#439 - Drew Benedetti / @cnorsl

02/20/2012 at 05:01PM

26
#440 - Gowtham Madhava / @gowthamgowtham

07/02/2012 at 04:47PM

26
#441 - うえっち / @uh_tomo

12/04/2012 at 05:19PM

26
#442 - XGOLFER / @vimg0lfer

01/04/2013 at 04:27AM

26
#443 - Kai Yuan / @kentyuan

02/21/2013 at 05:57PM

26
#444 - Stefan Leszkiewicz / @stefanlz

03/03/2013 at 01:40AM

26
#445 - barnabaguy / @barnabaguy

03/05/2014 at 08:57PM

26
#446 - Yuval Netanel / @Yuval5555

07/27/2014 at 02:11PM

26
#447 - Patrick Pitoscia / @Patrick03960431

08/06/2014 at 02:43AM

26
#448 - Kristijan Husak / @kristijan_husak

02/02/2015 at 10:11PM

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

03/26/2015 at 07:38AM

26
#450 - Hendrik Lammers / @hendriklammers

05/11/2015 at 07:05PM