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):
22
#31 - aimee / @sermoa

01/09/2011 at 04:20PM

22
#32 - aaaa3331 / @aaaa3331

01/10/2011 at 07:40PM

22
#33 - jacobangel / @jacobangel

01/13/2011 at 05:04AM

22
#34 - Francisco Dibar / @frandibar

01/13/2011 at 05:30AM

22
#35 - duckdalbe / @duckdalbe

01/14/2011 at 12:27PM

22
#36 - Ben Griffiths / @beng

01/15/2011 at 08:57PM

22
#37 - Oleg Roshupkin / @jjjahson

01/17/2011 at 10:52AM

22
#38 - Andrey Ivanov / @Bytamine

01/19/2011 at 09:00PM

22
#39 - Steve Morrow / @yawmark

01/26/2011 at 11:39PM

22
#40 - xhtmlforum / @xhtmlforum

02/01/2011 at 09:41PM

22
#41 - Arthur Chiu / @arthur_chiu

02/06/2011 at 08:16AM

22
#42 - Joost / @vlabakje

02/12/2011 at 12:31PM

22
#43 - Tom Duijf / @tomduijf

02/12/2011 at 12:42PM

22
#44 - vg / @vimgolfer

02/23/2011 at 11:02AM

22
#45 - Frederik Mogensen / @fmogensen

03/31/2011 at 10:46AM

22
#46 - (Emile (Swarts)) / @EmileSwarts

04/23/2011 at 12:19PM

22
#47 - Terje Larsen / @terlars

05/09/2011 at 02:46PM

22
#48 - Justin Love / @wondible

06/11/2011 at 12:08PM

22
#49 - Lauri Tirkkonen / @lotheac

07/01/2011 at 10:29PM

22
#50 - Hu Junfeng / @junfeng

07/15/2011 at 01:01PM

22
#51 - Sammasati / @sammasati0

07/15/2011 at 04:33PM

22
#52 - David / @dpa_92

08/02/2011 at 08:48AM

22
#53 - Jason Then / @racc69

08/09/2011 at 12:16AM

22
#54 - Neil / @spameldoon

08/20/2011 at 11:51PM

22
#55 - Ivan Evtukhovich / @evtuhovich

08/28/2011 at 07:25AM

22
#56 - Stanley Wang / @stanleynwang

08/28/2011 at 08:42AM

22
#57 - Petro Verkhogliad / @vpetro

08/28/2011 at 11:45PM

22
#58 - Simon's Calf / @simonscarfe

08/31/2011 at 10:04PM

22
#59 - Tim Tsu / @vimgolfpunk

09/04/2011 at 12:39AM

22
#60 - p0ckets / @p0ckets

10/07/2011 at 12:46AM