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

577 active golfers, 1541 entries

Leaderboard (lowest score wins):
54
#571 - jonbell17 / @jonbell17

12/30/2010 at 07:49PM

54
#572 - GE1S7 / @GE1S7

06/27/2024 at 11:40AM

56
#573 - Levon Lloyd / @levonlloyd

02/04/2011 at 04:08PM

57
#574 - joao neto / @joaonet49907796

05/17/2021 at 02:39PM

58
#575 - kaipi / @kaipi

12/29/2010 at 07:16PM

60
#576 - Mike Adolphs / @mike_adolphs

12/28/2010 at 11:30PM

69
#577 - Frank Hui / @frankhui

12/29/2010 at 06:44AM