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

607 active golfers, 1646 entries

Leaderboard (lowest score wins):
22
#61 - You-Siang Lin / @yslinnctu

11/28/2011 at 01:07PM

22
#62 - William Dunand / @wdunand

12/08/2011 at 06:18AM

22
#63 - Ali Moeeny MD PhD / @alimoeeny

12/17/2011 at 01:07AM

22
#64 - fred6 / @_fred6

12/19/2011 at 03:23AM

22
#65 - Xavier Nayrac / @lkdjiin

12/29/2011 at 03:28PM

22
#66 - Pei-Lun Lee / @ypcatw

01/06/2012 at 05:07AM

22
#67 - Zeh Rizzatti / @zehrizzatti

02/06/2012 at 04:32AM

22
#68 - Kristopher Urie / @kristopherurie

02/12/2012 at 05:03AM

22
#69 - snuffling / @snuffling

02/13/2012 at 02:22AM

22
#70 - じょんあば / @john_ababa

02/22/2012 at 02:09PM

22
#71 - Federico Galassi / @federicogalassi

02/22/2012 at 04:34PM

22
#72 - Pawel Obrok / @mrYapee

03/13/2012 at 08:43PM

22
#73 - mnx / @mnxx

05/09/2012 at 02:18PM

22
#74 - Rod Knowlton / @codelahoma

05/26/2012 at 09:55PM

22
#75 - Urtica dioica / @udioica

05/29/2012 at 02:15AM

22
#76 - mwatkward / @AftrschoolSpe

06/25/2012 at 09:36PM

22
#77 - John Piasetzki / @jpiasetz

07/13/2012 at 06:01AM

22
#78 - Sylvain / @20vinW

08/11/2012 at 03:45PM

22
#79 - Charles Gordon / @liberalbias

08/25/2012 at 10:39PM

22
#80 - tmr / @tmr314

09/05/2012 at 07:15PM

22
#81 - Son of Bongo / @bpcode

09/17/2012 at 02:35PM

22
#82 - Conner McDaniel / @connermcd

09/18/2012 at 05:33PM

22
#83 - Victor Ramirez / @virako

10/01/2012 at 02:10AM

22
#84 - Vim rocks / @vimrocks

10/06/2012 at 10:37AM

22
#85 - Kate / @Arohanui

10/30/2012 at 10:51AM

22
#86 - T / @tea_sea

11/10/2012 at 05:55PM

22
#87 - Hubba / @HubbaBubbaFett

12/02/2012 at 09:20AM

22
#88 - a24f0600 / @a24f0600

12/14/2012 at 06:10PM

22
#89 - Alec Goebel / @zego5360

01/07/2013 at 02:04AM

22
#90 - Koko / @Koko72525913

01/18/2013 at 02:31PM