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
#241 - Casey Dwyer / @caseydwyer

11/04/2013 at 02:10AM

23
#242 - US Dollar Price / @USDollarPrice

11/06/2013 at 05:59AM

23
#243 - gary.klindt@googlema / @garstekli

11/26/2013 at 04:30PM

23
#244 - Zach Kemp / @zvksf

12/20/2013 at 12:58AM

23
#245 - John Gray Cole / @johngraycole

02/14/2014 at 01:17AM

23
#246 - Robert Siemieniec / @rsiemieniec

04/10/2014 at 10:08AM

23
#247 - lastsseldon / @lastsseldon

05/10/2014 at 03:34AM

23
#248 - Ram Tamtam / @ramtamtamtam

06/30/2014 at 09:57AM

23
#249 - playalong / @playwithit42

07/16/2014 at 08:52AM

23
#250 - Rails Girls Tel-Aviv / @RailsGirlsTLV

07/27/2014 at 02:08PM

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

07/31/2014 at 01:40PM

23
#252 - Tj / @yrddy

08/19/2014 at 03:11AM

23
#253 - Greg / @developergreg

09/09/2014 at 01:31AM

23
#254 - Pierre Bertet / @bpierre

10/10/2014 at 07:05PM

23
#255 - merphant / @merphant

10/24/2015 at 06:37AM

23
#256 - Robert Goeddel / @f0rdpr3fect

11/10/2015 at 11:37PM

23
#257 - Dimitar Dimitrov / @kurkale6ka

03/17/2016 at 04:55PM

23
#258 - ramandeep randhawa / @rsrandhawa

04/10/2016 at 10:29PM

23
#259 - Will / @obiwan__k3n00bi

07/31/2016 at 08:51PM

23
#260 - jakeroberts / @jakeroberts

05/27/2017 at 07:59PM

23
#261 - Florian Gauger / @FlorianGauger

06/06/2017 at 01:01AM

23
#262 - Brendan B Amdocs / @AmdocsB

09/25/2018 at 04:33PM

23
#263 - Mihai / @mihaicristiant

12/27/2018 at 01:27PM

23
#264 - Vimfiz / @vimfiz

05/06/2019 at 09:51PM

23
#265 - Chester Yap / @Chest_ErYap

08/03/2019 at 07:14PM

23
#266 - Vim Player / @PlayerVim

10/07/2019 at 02:18PM

23
#267 - Lory / @Lory46845742

11/20/2019 at 12:57PM

23
#268 - iBhagwan / @iiBhagwan

06/04/2020 at 05:12PM

23
#269 - Michel Viktor / @tomkpz

08/11/2021 at 07:45PM

23
#270 - Dmitry / @MsDosLite

08/16/2021 at 02:39PM