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):
26
#361 - Patrick Pitoscia / @Patrick03960431

08/06/2014 at 02:43AM

26
#362 - Kristijan Husak / @kristijan_husak

02/02/2015 at 10:11PM

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

03/26/2015 at 07:38AM

26
#364 - Hendrik Lammers / @hendriklammers

05/11/2015 at 07:05PM

26
#365 - Walker Boh / @walker_boh

10/12/2015 at 11:05AM

26
#366 - Ian Trophy / @prfrgg

02/02/2016 at 08:01AM

26
#367 - Nathan Brown / @nkabrownie

03/15/2016 at 01:16PM

26
#368 - Jeremiah Goyette / @JeremiahGoyette

08/03/2016 at 06:48AM

26
#369 - Michał Dytko / @DytkoM

12/27/2016 at 03:13PM

26
#370 - RockerZZY / @rocker_zzy

06/11/2020 at 01:24PM

26
#371 - july9793 / @july9793_

01/06/2022 at 02:34PM

26
#372 - Victor Heid 🛸 / @victorheid

01/13/2022 at 05:45PM

27
#373 - Jonathan Wallace / @jonathanwallace

12/29/2010 at 03:41AM

27
#374 - Tom Adams / @holizz

12/29/2010 at 06:07AM

27
#375 - Barnaba Turek / @barnex

12/29/2010 at 02:23PM

27
#376 - solsTiCe d'Hiver / @solstice_dhiver

12/30/2010 at 06:21PM

27
#377 - Alain Gilbert / @alain_gilbert

12/30/2010 at 06:45PM

27
#378 - Rune Botten / @runeb

12/31/2010 at 01:17AM

27
#379 - David Pick / @davidpick

01/01/2011 at 08:22PM

27
#380 - Toto l'haricot / @nico_le_terribl

01/09/2011 at 12:22PM

27
#381 - alex scott / @4l3xsc0tt

01/10/2011 at 05:03PM

27
#382 - Dezső Zoltán / @zakiazigazi

01/22/2011 at 08:05AM

27
#383 - Matthieu Honel / @ocus

01/28/2011 at 05:03PM

27
#384 - Jeroen / @teranex

03/04/2011 at 12:31AM

27
#385 - Mike Marion / @mikejmarion

03/22/2011 at 07:12AM

27
#386 - Ilya Strukov / @i1ey

05/01/2011 at 05:58PM

27
#387 - Mikhail Korepanov / @PanyaKor

06/13/2011 at 03:22PM

27
#388 - Dave / @zzdave13

07/15/2011 at 01:14PM

27
#389 - Aaron Kalin / @martinisoft

09/16/2011 at 01:16AM

27
#390 - erktime / @erktime

09/16/2011 at 01:18AM