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):
22
#181 - ImaNotgate / @INotgate

05/09/2019 at 07:08PM

22
#182 - Magnus Bjuvensjö / @mbjuvensjo

06/12/2019 at 10:32PM

22
#183 - majo senf / @majo_senf

06/21/2019 at 01:26PM

22
#184 - Brandon Harrison / @llAboutB

09/25/2019 at 03:48PM

22
#185 - Tamás Kárándi / @tkarandi

10/19/2019 at 12:00PM

22
#186 - Melvin Cheung / @MelvinCheung

11/12/2019 at 03:53AM

22
#187 - Viktor Styrud / @ViktorStyrud

11/28/2019 at 04:14PM

22
#188 - Miłosz Łakomy / @foobar01123

12/12/2019 at 10:30AM

22
#189 - Victor / @victor_rma

04/24/2020 at 02:34AM

23
#190 - Mathias Rav / @iaddquotes

12/29/2010 at 01:29AM

23
#191 - dagbrown / @dagbrown

12/29/2010 at 08:03AM

23
#192 - foo bar / @whoever_foo

12/29/2010 at 08:15AM

23
#193 - Nadja Untendiegruft / @nadjau

12/29/2010 at 01:14PM

23
#194 - Kornél Lugosi / @Coornail

12/29/2010 at 04:30PM

23
#195 - Dan Smith / @untermrad

12/30/2010 at 09:57PM

23
#196 - Yannick LM / @yanicklm

12/30/2010 at 11:17PM

23
#197 - Vincent Isambart / @vincentisambart

12/31/2010 at 11:29AM

23
#198 - Marian Schubert / @MarianSchubert

01/08/2011 at 08:47PM

23
#199 - joshi / @VimFu

01/10/2011 at 07:42PM

23
#200 - Clive Evans / @swish_bob

01/17/2011 at 11:40PM

23
#201 - Andrey A. Ugolnik / @andreyugolnik

01/19/2011 at 10:53PM

23
#202 - Eivind Jahren / @HaskellElephant

02/02/2011 at 08:55PM

23
#203 - Ruy Diaz / @diazruy

03/20/2011 at 01:43AM

23
#204 - Sebastian Morr / @blinry

04/28/2011 at 08:27PM

23
#205 - mightyfoo / @mightyfoo

05/25/2011 at 02:22PM

23
#206 - Omar Ramos / @_omarramos

06/04/2011 at 05:25PM

23
#207 - Øystein Walle / @oysteinwalle

07/10/2011 at 01:35AM

23
#208 - pet_rock / @pet_rock

07/27/2011 at 02:15AM

23
#209 - sjatkinson / @sjatkinson

08/31/2011 at 03:29AM

23
#210 - nicolas bo / @thevegeta

11/09/2011 at 01:01PM