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):
24
#271 - Gwilym Kuiper / @gwilymk

07/11/2013 at 08:18PM

24
#272 - cj / @cj01101

08/08/2013 at 12:31PM

24
#273 - nona urbiz / @nospampleasemam

09/28/2013 at 07:00AM

24
#274 - NuM / @NuM314

10/05/2013 at 10:50PM

24
#275 - Nicholas Lee-Hone / @NicholasLeeHone

10/17/2014 at 05:25AM

24
#276 - Josu Oyanguren / @josuoyanguren

12/18/2014 at 05:26PM

24
#277 - SilentFl / @Silent_Fl

01/27/2015 at 02:29PM

24
#278 - Kiet Nguyen / @kietnguyen86

03/04/2015 at 12:21PM

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

03/27/2015 at 08:41AM

24
#280 - Andrew Michaud / @andrewjmichaud

09/04/2015 at 07:42PM

24
#281 - Cristian Lupașcu / @clupasq

02/08/2016 at 12:31PM

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

07/09/2019 at 02:06PM

25
#283 - krazylegz / @krazylegz

12/28/2010 at 11:30PM

25
#284 - Tim Pope / @tpope

12/28/2010 at 11:42PM

25
#285 - Brian Rose / @heimidal

12/29/2010 at 12:00AM

25
#286 - Bill Odom / @billodom

12/29/2010 at 12:56AM

25
#287 - Tim Baumann / @tbaumann

12/29/2010 at 01:40PM

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

12/29/2010 at 08:14PM

25
#289 - Rajit Singh / @rajitbsingh

12/29/2010 at 11:36PM

25
#290 - akatz / @akatz

12/30/2010 at 06:59AM

25
#291 - Gavin Gilmour / @_gavingilmour

01/02/2011 at 01:51PM

25
#292 - Mattiassich Ákos / @mattiassicha

01/02/2011 at 03:43PM

25
#293 - Roman Mašek / @romario333

01/05/2011 at 08:06PM

25
#294 - Jordi Romero / @jordiromero

01/07/2011 at 09:25PM

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

01/20/2011 at 09:16PM

25
#296 - Rob Ciaccio / @RobertoCalavera

01/21/2011 at 12:56PM

25
#297 - lukecowell / @lukecowell

12/15/2011 at 05:06AM

25
#298 - Renat Aksitov / @Korvin79

01/27/2012 at 10:58AM

25
#299 - Adrian Roston / @akroston

02/18/2012 at 10:34PM

25
#300 - Underhill Labs / @underhilllabs

10/30/2012 at 04:10AM