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

577 active golfers, 1541 entries

Leaderboard (lowest score wins):
22
#121 - Ian Laird / @irlaird

12/13/2013 at 04:17PM

22
#122 - Eric Potter / @pottereric

12/20/2013 at 03:11PM

22
#123 - Joshua Appelman / @JoshuaAppelman

12/21/2013 at 10:20PM

22
#124 - Pandu / @pandu_golf

01/05/2014 at 10:10AM

22
#125 - Quota / @Quotad

01/28/2014 at 08:59AM

22
#126 - Joonas Pihlajamaa / @jokkebk

02/19/2014 at 12:43PM

22
#127 - devper94 / @devper94

03/16/2014 at 10:03AM

22
#128 - RB / @powerage88

03/22/2014 at 04:36PM

22
#129 - John Braxler / @braxler

03/28/2014 at 09:50PM

22
#130 - Marcus Kellerman / @sharkusk

03/30/2014 at 06:23AM

22
#131 - ZorgroZ / @ZorgroZ

04/12/2014 at 03:52PM

22
#132 - Olivier Gayot / @duskCoder

05/01/2014 at 05:56PM

22
#133 - Sntano Euhsk / @SEuhsk

06/04/2014 at 06:56AM

22
#134 - John Meisner / @jmeisned

06/26/2014 at 05:54PM

22
#135 - Kelsey Ando / @d_chan42

07/09/2014 at 07:23PM

22
#136 - Marco Biasini / @biasmv

07/13/2014 at 06:57PM

22
#137 - LLiseil / @lliseil

07/15/2014 at 12:56PM

22
#138 - Paul Kunysch / @kunysch

07/18/2014 at 08:32PM

22
#139 - Caek / @Caek_

07/24/2014 at 11:34PM

22
#140 - Omer Lachish / @rauchy

07/27/2014 at 02:04PM

22
#141 - Almog / @almog

07/27/2014 at 02:08PM

22
#142 - Yariv / @yarivb

07/27/2014 at 02:12PM

22
#143 - Ben Haines / @bhainesva

08/08/2014 at 01:59PM

22
#144 - Jose Gutierrez / @Jogusa

09/20/2014 at 06:21PM

22
#145 - Johannes H. / @neVexa

09/23/2014 at 10:33AM

22
#146 - Michael Comerford / @MComerford1

09/24/2014 at 11:05PM

22
#147 - Hanakun. / @akunohanaKUN

10/21/2014 at 05:36AM

22
#148 - eBrnd / @eBrnd

11/03/2014 at 07:18PM

22
#149 - Jake Eskel / @JakeEskel

01/07/2015 at 03:57AM

22
#150 - kimber gonzalez / @kimberlycreates

01/14/2015 at 04:50PM