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):
25
#301 - Brian Rose / @heimidal

12/29/2010 at 12:00AM

25
#302 - Bill Odom / @billodom

12/29/2010 at 12:56AM

25
#303 - Tim Baumann / @tbaumann

12/29/2010 at 01:40PM

25
#304 - Jiří Stránský / @jistr

12/29/2010 at 08:14PM

25
#305 - Rajit Singh / @rajitbsingh

12/29/2010 at 11:36PM

25
#306 - akatz / @akatz

12/30/2010 at 06:59AM

25
#307 - Gavin Gilmour / @_gavingilmour

01/02/2011 at 01:51PM

25
#308 - Mattiassich Ákos / @mattiassicha

01/02/2011 at 03:43PM

25
#309 - Roman Mašek / @romario333

01/05/2011 at 08:06PM

25
#310 - Jordi Romero / @jordiromero

01/07/2011 at 09:25PM

25
#311 - Thomas Schönwälder / @Masei1988

01/20/2011 at 09:16PM

25
#312 - Rob Ciaccio / @RobertoCalavera

01/21/2011 at 12:56PM

25
#313 - lukecowell / @lukecowell

12/15/2011 at 05:06AM

25
#314 - Renat Aksitov / @Korvin79

01/27/2012 at 10:58AM

25
#315 - Adrian Roston / @akroston

02/18/2012 at 10:34PM

25
#316 - Underhill Labs / @underhilllabs

10/30/2012 at 04:10AM

25
#317 - Lieven Keersmaekers / @LievenKeersmaek

01/18/2013 at 06:43PM

25
#318 - Joshua Draper / @JoshuaBDraper

05/25/2013 at 03:50PM

25
#319 - Todd Branchflower / @toddbranch

07/18/2013 at 09:13PM

25
#320 - Nathan / @NathanHarperoni

08/08/2013 at 01:30PM

25
#321 - Bart of Denver / @bartofdenver

08/12/2013 at 04:30PM

25
#322 - Salleyron Julien / @juguul

01/02/2014 at 10:28AM

25
#323 - ryk / @rykarn

05/02/2014 at 08:02PM

25
#324 - Amir Kremer / @AmirKremer

07/27/2014 at 02:06PM

25
#325 - Vincent Dumoulin / @dumoulinv

11/23/2014 at 05:28AM

25
#326 - Zach Gulde / @zgulde

02/29/2016 at 06:00AM

25
#327 - Paul Draghicescu / @pdragy

03/23/2018 at 12:04AM

25
#328 - faisal / @faisalhackshah

11/26/2018 at 07:12PM

25
#329 - Ivo Blöchliger / @aigledesalpes

08/18/2019 at 08:10AM

26
#330 - Duda Dornelles / @dudadornelles

12/29/2010 at 12:06AM