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):
27
#421 - Jeffrey Gu / @Jeffrey_Gu

03/20/2015 at 04:54PM

27
#422 - Valentino / @iv_alentino

03/20/2015 at 04:55PM

27
#423 - Jack Yeh / @tinyhousejack

03/20/2015 at 04:55PM

27
#424 - luffy / @raxcoi

06/07/2015 at 08:59PM

27
#425 - Gerald Tilma / @GeraldTilma

10/20/2015 at 02:09AM

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

05/04/2016 at 09:35PM

27
#427 - quiggy🌹 / @quiggy

05/19/2016 at 07:47PM

27
#428 - Kyouma / @kyoumaJohn

10/14/2016 at 07:45PM

27
#429 - Daniel / @Daniel00288663

03/30/2017 at 02:03PM

27
#430 - Gurukandhamoorthi / @Gurukandhamoor1

07/13/2017 at 11:45AM

27
#431 - Moritz Manner / @moritz_manner

01/01/2018 at 06:45PM

27
#432 - Romain D. / @r_dulery

02/06/2018 at 07:30PM

27
#433 - Austin Ware / @AustinWare17

03/13/2018 at 02:17AM

27
#434 - William Hamilton / @BobHamiltonijk

05/26/2018 at 02:11AM

27
#435 - Phoon / @justflashhim

05/11/2019 at 04:24PM

27
#436 - albalitz / @_albalitz

06/13/2019 at 11:52AM

27
#437 - José / @AngelGaldamez

08/31/2019 at 03:25AM

27
#438 - Rick de chez Gnous / @GnousRick

07/09/2021 at 11:45AM

27
#439 - Sergio / @SergioVl12

07/24/2021 at 03:53PM

27
#440 - Bobik / @Bobik90703384

10/13/2021 at 06:24PM

27
#441 - Levi Wheeler / @LeviWhe68726437

06/14/2022 at 11:22PM

28
#442 - lionel young / @lionelyoung

12/28/2010 at 11:42PM

28
#443 - eolo999 / @eolo999

12/29/2010 at 12:04AM

28
#444 - Martin Pugh / @s3krit

12/29/2010 at 02:11AM

28
#445 - Hung Huu Hoang / @hungh3

12/30/2010 at 07:36AM

28
#446 - Jan B. / @bracki

01/03/2011 at 10:27PM

28
#447 - Wesley Wong / @wesleymwwong

01/29/2011 at 09:59PM

28
#448 - Sergey Kim / @skim1776

08/22/2011 at 09:00AM

28
#449 - ise0615 / @ise0615

05/04/2012 at 05:23PM

28
#450 - curist / @curist

07/09/2013 at 08:06AM