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

592 active golfers, 1588 entries

Leaderboard (lowest score wins):
22
#1 - Aaron Bull Schaefer / @elasticdog

12/28/2010 at 11:43PM

22
#2 - togi / @togi

12/29/2010 at 05:08PM

22
#3 - Austin Taylor / @austintaylor

12/29/2010 at 05:13PM

22
#4 - Utkarsh Kukreti / @utkarshkukreti

12/29/2010 at 05:41PM

22
#5 - dcbaok / @dcbaok

12/29/2010 at 08:55PM

22
#6 - Mike Plotz / @antisuji

12/30/2010 at 01:42AM

22
#7 - Josh Weinberg / @jcweinberg

12/30/2010 at 04:31AM

22
#8 - Akira Matsuda / @a_matsuda

12/30/2010 at 05:27AM

22
#9 - h_east (トロッコ6個) / @h_east

12/30/2010 at 09:18AM

22
#10 - Ben Lenarts / @benlenarts

12/30/2010 at 11:35AM

22
#11 - Mikel Ward / @mikelward

12/31/2010 at 06:53AM

22
#12 - Dmytro Shteflyuk / @kpumuk

12/31/2010 at 07:39AM

22
#13 - Guillaume Bonnoron / @gbonnoron

12/31/2010 at 12:41PM

22
#14 - Behnam Esfahbod / @zwnj

12/31/2010 at 02:21PM

22
#15 - Casey W Crites / @caseycrites

12/31/2010 at 10:01PM

22
#16 - dominique pellé / @vimgolfisto

01/01/2011 at 01:20PM

22
#17 - n / @kivran

01/01/2011 at 06:06PM

22
#18 - Balkoth / @_Balkoth_

01/01/2011 at 06:51PM

22
#19 - Brad / @bjjwillis

01/02/2011 at 11:37AM

22
#20 - Asmund / @herrasbe

01/02/2011 at 06:21PM

22
#21 - Wei Dai / @clvv42

01/02/2011 at 11:49PM

22
#22 - Larry Marburger / @lmarburger

01/03/2011 at 05:58PM

22
#23 - ls lahrs / @lslah

01/04/2011 at 08:16PM

22
#24 - Ravil Bayramgalin / @brainopia

01/05/2011 at 02:36AM

22
#25 - derp derp / @derp__

01/05/2011 at 06:23AM

22
#26 - Fer Enaf / @0x00C0FFEE

01/05/2011 at 10:52AM

22
#27 - Ujjwol Lamichhane / @Ujjwol

01/06/2011 at 11:49AM

22
#28 - Tim Chase / @gumnos

01/08/2011 at 04:11AM

22
#29 - Pete Johns / @johnsyweb

01/09/2011 at 09:09AM

22
#30 - Matt Tarbit / @mtarbit

01/09/2011 at 09:21AM