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):
22
#91 - Jimmy Mabey / @mabeyj

01/20/2013 at 08:19PM

22
#92 - Niels Madan / @nielsmadan

01/29/2013 at 08:13AM

22
#93 - Yann Moisan / @YannMoisan

02/02/2013 at 01:52PM

22
#94 - xavier kt / @xav_kt

02/03/2013 at 07:23PM

22
#95 - Pedro Franceschi / @pedroh96

02/05/2013 at 08:27PM

22
#96 - Jonas Engman / @jodas

02/18/2013 at 09:03PM

22
#97 - Adam Bell / @adamgbell

03/18/2013 at 01:14AM

22
#98 - HongKilDong / @HongKilDong

03/18/2013 at 01:04PM

22
#99 - Matt Adelman / @Xavierstein

03/20/2013 at 08:04PM

22
#100 - Tyler / @tylerbindon

03/31/2013 at 05:39AM

22
#101 - Martin Keogh / @Martin1Keogh

03/31/2013 at 03:48PM

22
#102 - Ben White / @MichaelBeemer

04/10/2013 at 10:28PM

22
#103 - Charlene Tshos / @charlymul

04/17/2013 at 02:02PM

22
#104 - Kuldeep Bora / @kuldeep_bora

04/19/2013 at 07:49AM

22
#105 - Trevor Powell / @DoomedBunnies

05/14/2013 at 07:14AM

22
#106 - M8R eonxi21 / @eonxi21

05/20/2013 at 09:10PM

22
#107 - Marco Hinz / @_mhinz_

05/21/2013 at 11:36AM

22
#108 - Tyler Tesch / @TylerTesch

06/02/2013 at 10:18PM

22
#109 - Petro Тrouq / @zulolosi

06/05/2013 at 09:17PM

22
#110 - Steve Tjoa / @stevetjoa

07/04/2013 at 08:03AM

22
#111 - Bradd Szonye / @bszonye

07/13/2013 at 08:17AM

22
#112 - Rick Button / @rickbutton

07/24/2013 at 06:10AM

22
#113 - Ingo / @ist3fani

07/30/2013 at 02:53PM

22
#114 - Przemysław Kamiński / @CXLII

08/14/2013 at 05:32AM

22
#115 - pu / @pawwwelek1989

08/18/2013 at 12:58PM

22
#116 - Stephen Drodge / @sjdrodge

10/08/2013 at 12:29AM

22
#117 - Marcin Sza / @coot_

10/12/2013 at 08:59AM

22
#118 - newton / @newtonsmartt

10/16/2013 at 09:30PM

22
#119 - Robert Rosolek / @robertrosolek

10/18/2013 at 07:45AM

22
#120 - Stefan Schmidt / @stafue

12/06/2013 at 01:25PM