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

493 active golfers, 1270 entries

Leaderboard (lowest score wins):
36
#481 - Alfredo Deza / @alfredodeza

12/29/2010 at 01:33AM

36
#482 - Steve Klabnik / @steveklabnik

12/29/2010 at 03:10AM

38
#483 - Hendrik Nigul / @nigulh

12/29/2010 at 01:40PM

40
#484 - Rohit Nair / @rohitnair

12/29/2010 at 03:39AM

44
#485 - Timothy Hahn / @timyhahn

04/20/2012 at 03:52AM

46
#486 - Pete O'Grady / @peteog

01/04/2011 at 11:35AM

50
#487 - Folke Lemaitre / @Folke

11/24/2011 at 09:37PM

52
#488 - tinco / @tinco

12/29/2010 at 03:26PM

54
#489 - jonbell17 / @jonbell17

12/30/2010 at 07:49PM

56
#490 - Levon Lloyd / @levonlloyd

02/04/2011 at 04:08PM

58
#491 - kaipi / @kaipi

12/29/2010 at 07:16PM

60
#492 - Mike Adolphs / @mike_adolphs

12/28/2010 at 11:30PM

69
#493 - Frank Hui / @frankhui

12/29/2010 at 06:44AM