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):
23
#271 - Sean Cahill / @ess_jay_kay

11/01/2021 at 03:40PM

23
#272 - POSIX / @po6ix

01/10/2022 at 01:33AM

23
#273 - shahanavaz m / @shahanavazm

02/12/2022 at 10:38PM

23
#274 - blabla zincou / @BZincou

03/09/2022 at 08:02PM

23
#275 - x03n046 / @x03n046

05/13/2022 at 05:18AM

24
#276 - Samus_ Michael / @gonna_hate

12/29/2010 at 04:59AM

24
#277 - uuu / @uu59

12/29/2010 at 11:54PM

24
#278 - Cristi Balan / @evilchelu

01/01/2011 at 06:42AM

24
#279 - vTsoumenis / @kioopi

01/02/2011 at 05:48PM

24
#280 - Nick / @quinks25

01/10/2011 at 04:41AM

24
#281 - Solomon White / @rubysolo

02/08/2011 at 05:28PM

24
#282 - Jeyant Randhawa / @jeyant1987

05/17/2011 at 08:10AM

24
#283 - Damian Dawber / @damian6970

06/05/2011 at 01:28PM

24
#284 - Domon / @Domon

09/11/2012 at 10:45AM

24
#285 - Marcin Radomski / @_dextero

11/15/2012 at 08:06PM

24
#286 - David Hoeffer / @dhoeffer

04/25/2013 at 02:21AM

24
#287 - Gwilym Kuiper / @gwilymk

07/11/2013 at 08:18PM

24
#288 - cj / @cj01101

08/08/2013 at 12:31PM

24
#289 - nona urbiz / @nospampleasemam

09/28/2013 at 07:00AM

24
#290 - NuM / @NuM314

10/05/2013 at 10:50PM

24
#291 - Nicholas Lee-Hone / @NicholasLeeHone

10/17/2014 at 05:25AM

24
#292 - Josu Oyanguren / @josuoyanguren

12/18/2014 at 05:26PM

24
#293 - SilentFl / @Silent_Fl

01/27/2015 at 02:29PM

24
#294 - Kiet Nguyen / @kietnguyen86

03/04/2015 at 12:21PM

24
#295 - Sigurður Ægir Jónsso / @siggiae

03/27/2015 at 08:41AM

24
#296 - Andrew Michaud / @andrewjmichaud

09/04/2015 at 07:42PM

24
#297 - Cristian Lupașcu / @clupasq

02/08/2016 at 12:31PM

24
#298 - Березницкий Вадим / @vad1mster

07/09/2019 at 02:06PM

25
#299 - krazylegz / @krazylegz

12/28/2010 at 11:30PM

25
#300 - Tim Pope / @tpope

12/28/2010 at 11:42PM