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):
27
#391 - Woojung Kim 김우중 / @_kimwz

07/13/2013 at 12:21AM

27
#392 - A / @Tower_1980

07/29/2013 at 01:47PM

27
#393 - James / @Dronak

08/29/2013 at 03:52PM

27
#394 - Stephen Binns / @stephenbinns

09/08/2013 at 03:07PM

27
#395 - engy / @engydmw

09/25/2013 at 09:10PM

27
#396 - wilddog64 / @chengkai318

12/17/2013 at 08:42PM

27
#397 - pikaren / @REALpikaren

01/03/2014 at 03:29AM

27
#398 - João Paiva / @jgpaiva

01/31/2014 at 11:39AM

27
#399 - skensell / @skensell

04/27/2014 at 09:12AM

27
#400 - Talya S / @_tomata

07/27/2014 at 02:09PM

27
#401 - jake worth / @jwworth

01/02/2015 at 11:12PM

27
#402 - lpm11 / T. Tsunoda / @lpm11

02/16/2015 at 11:57AM

27
#403 - Jeffrey Gu / @Jeffrey_Gu

03/20/2015 at 04:54PM

27
#404 - Valentino / @iv_alentino

03/20/2015 at 04:55PM

27
#405 - Jack Yeh / @tinyhousejack

03/20/2015 at 04:55PM

27
#406 - luffy / @raxcoi

06/07/2015 at 08:59PM

27
#407 - Gerald Tilma / @GeraldTilma

10/20/2015 at 02:09AM

27
#408 - Bogumił Kamiński / @BogumilKaminski

05/04/2016 at 09:35PM

27
#409 - quiggy🌹 / @quiggy

05/19/2016 at 07:47PM

27
#410 - Kyouma / @kyoumaJohn

10/14/2016 at 07:45PM

27
#411 - Daniel / @Daniel00288663

03/30/2017 at 02:03PM

27
#412 - Gurukandhamoorthi / @Gurukandhamoor1

07/13/2017 at 11:45AM

27
#413 - Moritz Manner / @moritz_manner

01/01/2018 at 06:45PM

27
#414 - Romain D. / @r_dulery

02/06/2018 at 07:30PM

27
#415 - Austin Ware / @AustinWare17

03/13/2018 at 02:17AM

27
#416 - William Hamilton / @BobHamiltonijk

05/26/2018 at 02:11AM

27
#417 - Phoon / @justflashhim

05/11/2019 at 04:24PM

27
#418 - albalitz / @_albalitz

06/13/2019 at 11:52AM

27
#419 - José / @AngelGaldamez

08/31/2019 at 03:25AM

28
#420 - lionel young / @lionelyoung

12/28/2010 at 11:42PM