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

493 active golfers, 1270 entries

Leaderboard (lowest score wins):
28
#421 - eolo999 / @eolo999

12/29/2010 at 12:04AM

28
#422 - Martin Pugh / @s3krit

12/29/2010 at 02:11AM

28
#423 - Hung Huu Hoang / @hungh3

12/30/2010 at 07:36AM

28
#424 - Jan B. / @bracki

01/03/2011 at 10:27PM

28
#425 - Wesley Wong / @wesleymwwong

01/29/2011 at 09:59PM

28
#426 - Sergey Kim / @skim1776

08/22/2011 at 09:00AM

28
#427 - ise0615 / @ise0615

05/04/2012 at 05:23PM

28
#428 - curist / @curist

07/09/2013 at 08:06AM

28
#429 - Oliver Christ / @0liverChrist

09/25/2013 at 03:19PM

28
#430 - Bjorn / @bjorn_248

11/15/2013 at 09:01PM

28
#431 - z0c / @zerocabal

06/12/2018 at 08:58AM

29
#432 - Jason Gilman / @axodys

12/29/2010 at 12:43AM

29
#433 - Simon Brown / @caelyxsec

12/29/2010 at 06:49AM

29
#434 - Joe Hassick / @jhassick

12/29/2010 at 05:41PM

29
#435 - TchiKong / @tchikong

01/23/2011 at 11:22AM

29
#436 - Ed Gibbs / @edward_gibbs

08/18/2011 at 02:46AM

29
#437 - Dave Lyon / @daveisonthego

09/16/2011 at 01:07AM

29
#438 - Daniel Harrington / @rubiii

12/10/2011 at 07:46PM

29
#439 - Nick Bakkegaard / @Bakkemand

11/26/2012 at 11:59PM

29
#440 - Chenut Ludovic / @7Brwa7

03/31/2016 at 04:43PM

29
#441 - Max Del Giudice / @max_forest

04/18/2016 at 08:51AM

30
#442 - Ronuk Raval / @rraval

12/28/2010 at 11:29PM

30
#443 - Stefan Borsje / @sborsje

12/28/2010 at 11:53PM

30
#444 - Phil / @phil30075

12/29/2010 at 04:18AM

30
#445 - pcapriotti / @pcapriotti

12/29/2010 at 11:47AM

30
#446 - Daniel Hahler / @blueyed

12/29/2010 at 07:23PM

30
#447 - Amir Hedayaty / @hedayaty

12/30/2010 at 12:33PM

30
#448 - Tim Andersson / @Boerworz

04/19/2011 at 09:44PM

30
#449 - Scott Myц / @ScottMuc

04/07/2013 at 05:01AM

30
#450 - Justin Knag / @justinknag

08/28/2014 at 02:53PM