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):
23
#241 - Rails Girls Tel-Aviv / @RailsGirlsTLV

07/27/2014 at 02:08PM

23
#242 - Fran├žois Marais / @maraisf

07/31/2014 at 01:40PM

23
#243 - Tj / @yrddy

08/19/2014 at 03:11AM

23
#244 - Greg / @developergreg

09/09/2014 at 01:31AM

23
#245 - Pierre Bertet / @bpierre

10/10/2014 at 07:05PM

23
#246 - merphant / @merphant

10/24/2015 at 06:37AM

23
#247 - Robert Goeddel / @f0rdpr3fect

11/10/2015 at 11:37PM

23
#248 - Dimitar Dimitrov / @kurkale6ka

03/17/2016 at 04:55PM

23
#249 - ramandeep randhawa / @rsrandhawa

04/10/2016 at 10:29PM

23
#250 - Will / @obiwan__k3n00bi

07/31/2016 at 08:51PM

23
#251 - jakeroberts / @jakeroberts

05/27/2017 at 07:59PM

23
#252 - Florian Gauger / @FlorianGauger

06/06/2017 at 01:01AM

23
#253 - Brendan B Amdocs / @AmdocsB

09/25/2018 at 04:33PM

23
#254 - Mihai / @mihaicristiant

12/27/2018 at 01:27PM

23
#255 - Vimfiz / @vimfiz

05/06/2019 at 09:51PM

23
#256 - Chester Yap / @Chest_ErYap

08/03/2019 at 07:14PM

23
#257 - Vim Player / @PlayerVim

10/07/2019 at 02:18PM

23
#258 - Lory / @Lory46845742

11/20/2019 at 12:57PM

23
#259 - Bhagwan / @El_Bhagwan

06/04/2020 at 05:12PM

24
#260 - Samus_ Michael / @gonna_hate

12/29/2010 at 04:59AM

24
#261 - uuu / @uu59

12/29/2010 at 11:54PM

24
#262 - Cristi Balan / @evilchelu

01/01/2011 at 06:42AM

24
#263 - vTsoumenis / @kioopi

01/02/2011 at 05:48PM

24
#264 - Nick / @quinks25

01/10/2011 at 04:41AM

24
#265 - Solomon White / @rubysolo

02/08/2011 at 05:28PM

24
#266 - Jeyant Randhawa / @jeyant1987

05/17/2011 at 08:10AM

24
#267 - Damian Dawber / @damian6970

06/05/2011 at 01:28PM

24
#268 - Domon / @Domon

09/11/2012 at 10:45AM

24
#269 - Marcin Radomski / @_dextero

11/15/2012 at 08:06PM

24
#270 - David Hoeffer / @dhoeffer

04/25/2013 at 02:21AM