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

493 active golfers, 1270 entries

Leaderboard (lowest score wins):
30
#451 - Jurica / @Jurica34581259

11/16/2018 at 05:33PM

30
#452 - abhijeet patil / @abhijeetptl5

09/03/2020 at 03:12AM

31
#453 - David Wolever / @wolever

12/28/2010 at 11:27PM

31
#454 - Paul Tarjan / @ptarjan

12/29/2010 at 11:35AM

31
#455 - leprechaun / @irishlinuxgeek

12/29/2010 at 06:57PM

31
#456 - garygordon / @garygordon

01/01/2011 at 07:25PM

31
#457 - rdt / @rdtft

02/07/2011 at 11:16PM

31
#458 - Alex Kolesnikov / @k0lesman

05/01/2011 at 12:31AM

31
#459 - Bjørn Einar Bjartnes / @bjartnes

01/27/2012 at 01:44PM

31
#460 - Aaron / @_Lordofthevoid_

12/10/2019 at 08:43PM

32
#461 - Joe McCall / @joem86

12/29/2010 at 01:09AM

32
#462 - Peter Krenn / @peterkrenn

12/29/2010 at 01:24AM

32
#463 - Tyler Wymer / @twymer

12/29/2010 at 02:27AM

32
#464 - Chris Metcalf / @chrismetcalf

12/29/2010 at 04:32AM

32
#465 - Rasmus P / @rasmup

12/29/2010 at 05:11PM

32
#466 - Unsouled / @unsouled0

12/30/2010 at 03:09AM

32
#467 - David / @ddddddddavid

12/30/2010 at 05:05AM

32
#468 - Daniel Grippi / @danielgrippi

01/02/2011 at 04:33PM

33
#469 - dschobel / @dschobel

12/29/2010 at 07:52AM

33
#470 - Ajith Antony / @ajithantony

12/29/2010 at 01:03PM

33
#471 - sorami / @boredoms

04/30/2011 at 09:48PM

34
#472 - Cartney McLennon / @mepsi_pax

12/29/2010 at 01:31AM

34
#473 - drio / @drio

12/30/2010 at 10:42AM

34
#474 - Pawka / @Pawka

01/16/2011 at 11:26AM

34
#475 - id / @tunguska112

07/24/2014 at 09:40AM

34
#476 - 正攻法なボクでいく / @Eiryyy

11/25/2014 at 06:52AM

35
#477 - Antonio Lucca / @tonyxzt

12/29/2010 at 12:27AM

35
#478 - Jesse Brown / @bionicpill

12/29/2010 at 12:43AM

35
#479 - John Reitano / @johnreitano

12/29/2010 at 12:50AM

35
#480 - Samuel / @Namgnoi

01/31/2013 at 09:32PM