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):
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

22
#190 - Scott Atkins / @scottrick49

06/23/2021 at 02:24PM

22
#191 - Jung Yeon Park / @park_jungy

08/09/2021 at 07:04PM

22
#192 - const { andre } = scalco; / @andre_scalco

12/02/2021 at 01:23AM

22
#193 - Jean George / @JeanGeo20504212

01/07/2022 at 02:44PM

22
#194 - Andreas Siegrist / @andreaszwei

02/01/2022 at 08:02PM

22
#195 - Ofer Yehuda / @OferYehuda

02/19/2022 at 02:02PM

22
#196 - Tyler Carson / @tylerccarson

03/18/2022 at 11:08PM

22
#197 - russellzhaomao / @russellzhaomao

05/25/2022 at 03:09AM

22
#198 - josh / @_zvjos

06/19/2022 at 01:12AM

23
#199 - Mathias Rav / @iaddquotes

12/29/2010 at 01:29AM

23
#200 - dagbrown / @dagbrown

12/29/2010 at 08:03AM

23
#201 - foo bar / @whoever_foo

12/29/2010 at 08:15AM

23
#202 - Nadja Untendiegruft / @nadjau

12/29/2010 at 01:14PM

23
#203 - Kornél Lugosi / @Coornail

12/29/2010 at 04:30PM

23
#204 - Dan Smith / @untermrad

12/30/2010 at 09:57PM

23
#205 - Yannick LM / @yanicklm

12/30/2010 at 11:17PM

23
#206 - Vincent Isambart / @vincentisambart

12/31/2010 at 11:29AM

23
#207 - Marian Schubert / @MarianSchubert

01/08/2011 at 08:47PM

23
#208 - joshi / @VimFu

01/10/2011 at 07:42PM

23
#209 - Clive Evans / @swish_bob

01/17/2011 at 11:40PM

23
#210 - Andrey A. Ugolnik / @andreyugolnik

01/19/2011 at 10:53PM