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

489 active golfers, 1260 entries

Leaderboard (lowest score wins):
44
#481 - Timothy Hahn / @timyhahn

04/20/2012 at 03:52AM

46
#482 - Pete O'Grady / @peteog

01/04/2011 at 11:35AM

50
#483 - Folke Lemaitre / @Folke

11/24/2011 at 09:37PM

52
#484 - tinco / @tinco

12/29/2010 at 03:26PM

54
#485 - jonbell17 / @jonbell17

12/30/2010 at 07:49PM

56
#486 - Levon Lloyd / @levonlloyd

02/04/2011 at 04:08PM

58
#487 - kaipi / @kaipi

12/29/2010 at 07:16PM

60
#488 - Mike Adolphs / @mike_adolphs

12/28/2010 at 11:30PM

69
#489 - Frank Hui / @frankhui

12/29/2010 at 06:44AM