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 608 remaining solutions by signing in and submitting your own entry
#609 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

609 active golfers, 1649 entries

Leaderboard (lowest score wins):
25
#391 - Vincent Dumoulin / @dumoulinv

11/23/2014 at 05:28AM

25
#392 - Zach Gulde / @zgulde

02/29/2016 at 06:00AM

25
#393 - Paul Draghicescu / @pdragy

03/23/2018 at 12:04AM

25
#394 - faisal / @faisalhackshah

11/26/2018 at 07:12PM

25
#395 - Ivo Blöchliger / @aigledesalpes

08/18/2019 at 08:10AM

25
#396 - Michael / @openemitter

12/27/2023 at 01:41PM

25
#397 - 🥚 / @schmarles_

10/23/2024 at 09:08PM

26
#398 - Duda Dornelles / @dudadornelles

12/29/2010 at 12:06AM

26
#399 - Todd Dombrowski / @tdombrowski

12/29/2010 at 12:07AM

26
#400 - Steven Grady / @steven807

12/29/2010 at 01:07AM

26
#401 - omelo / @omelo

12/29/2010 at 08:46AM

26
#402 - Leonard Chin / @lchin

12/29/2010 at 10:42AM

26
#403 - Indrek Juhkam / @indrekj

12/29/2010 at 11:52AM

26
#404 - Adam Pohorecki / @apohorecki

12/29/2010 at 02:16PM

26
#405 -  Ikhsan Maulana / @ixandidu

12/30/2010 at 11:03AM

26
#406 - Denis Odorcic / @denisodorcic

12/30/2010 at 08:25PM

26
#407 - Jim Garvin / @coderifous

12/30/2010 at 09:10PM

26
#408 - Sam Nardoni / @samnardoni

12/31/2010 at 12:26AM

26
#409 - clint tseng / @cxlt

01/02/2011 at 06:39AM

26
#410 - Stuart Gale / @bishboria

01/02/2011 at 04:54PM

26
#411 - bing_twic / @bing_twic

03/09/2011 at 07:33PM

26
#412 - Craig H. Anderson / @CootCraig

04/19/2011 at 09:06PM

26
#413 - Jean-Christophe Cyr / @jccyr01

05/28/2011 at 02:00AM

26
#414 - Rolf K. / @mindleftbody

06/17/2011 at 12:59PM

26
#415 - Jim Infield / @jinfield

07/15/2011 at 12:01AM

26
#416 - quintin / @quintinjeannoel

08/29/2011 at 09:13PM

26
#417 - jasper110 / @jasper110

09/22/2011 at 09:55AM

26
#418 - Dave Bradford / @dbradf

10/12/2011 at 06:04PM

26
#419 - Jaime A. Sánchez / @jashbeta

12/26/2011 at 01:52AM

26
#420 - Daniel Cohen / @danielissimo

02/12/2012 at 08:23PM