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

632 active golfers, 1724 entries

Leaderboard (lowest score wins):
26
#451 - Nathan Brown / @nkabrownie

03/15/2016 at 01:16PM

26
#452 - Jeremiah Goyette / @JeremiahGoyette

08/03/2016 at 06:48AM

26
#453 - Michał Dytko / @DytkoM

12/27/2016 at 03:13PM

26
#454 - RockerZZY / @rocker_zzy

06/11/2020 at 01:24PM

26
#455 - july9793 / @july9793_

01/06/2022 at 02:34PM

26
#456 - Victor Heid 🛸 / @victorheid

01/13/2022 at 05:45PM

26
#457 - Thermospore / @Thermospore

05/23/2024 at 06:29AM

27
#458 - Jonathan Wallace / @jonathanwallace

12/29/2010 at 03:41AM

27
#459 - Tom Adams / @holizz

12/29/2010 at 06:07AM

27
#460 - Barnaba Turek / @barnex

12/29/2010 at 02:23PM

27
#461 - solsTiCe d'Hiver / @solstice_dhiver

12/30/2010 at 06:21PM

27
#462 - Alain Gilbert / @alain_gilbert

12/30/2010 at 06:45PM

27
#463 - Rune Botten / @runeb

12/31/2010 at 01:17AM

27
#464 - David Pick / @davidpick

01/01/2011 at 08:22PM

27
#465 - Toto l'haricot / @nico_le_terribl

01/09/2011 at 12:22PM

27
#466 - alexscott / @4l3xsc0tt

01/10/2011 at 05:03PM

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

01/22/2011 at 08:05AM

27
#468 - Matthieu Honel / @ocus

01/28/2011 at 05:03PM

27
#469 - Jeroen / @teranex

03/04/2011 at 12:31AM

27
#470 - Mike Marion / @mikejmarion

03/22/2011 at 07:12AM

27
#471 - Ilya Strukov / @i1ey

05/01/2011 at 05:58PM

27
#472 - Mikhail Korepanov / @PanyaKor

06/13/2011 at 03:22PM

27
#473 - Dave / @zzdave13

07/15/2011 at 01:14PM

27
#474 - Aaron Kalin / @martinisoft

09/16/2011 at 01:16AM

27
#475 - erktime / @erktime

09/16/2011 at 01:18AM

27
#476 - palentine / @palentine

12/12/2011 at 07:39PM

27
#477 - ümit kablan / @udslk

03/11/2012 at 02:11PM

27
#478 - Nolen Royalty / @NolenRoyalty

04/21/2012 at 02:52AM

27
#479 - Yusuke Tsutsumi / @tsutsumiyusuke

05/03/2012 at 12:15AM

27
#480 - Tomas Frostensson / @frostensson

05/22/2012 at 02:47PM