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

634 active golfers, 1732 entries

Leaderboard (lowest score wins):
33
#601 - dschobel / @dschobel

12/29/2010 at 07:52AM

33
#602 - Ajith Antony / @ajithantony

12/29/2010 at 01:03PM

33
#603 - sorami / @boredoms

04/30/2011 at 09:48PM

33
#604 - Карл / @tb_ism

07/23/2021 at 01:07AM

33
#605 - Adigan / @Addigan

05/13/2023 at 12:29PM

33
#606 - qung-odoo / @qung-odoo

05/10/2025 at 05:55AM

34
#607 - Cartney McLennon / @mepsi_pax

12/29/2010 at 01:31AM

34
#608 - drio / @drio

12/30/2010 at 10:42AM

34
#609 - Pawka / @Pawka

01/16/2011 at 11:26AM

34
#610 - id / @tunguska112

07/24/2014 at 09:40AM

34
#611 - 正攻法なボクでいく / @Eiryyy

11/25/2014 at 06:52AM

35
#612 - Antonio Lucca / @tonyxzt

12/29/2010 at 12:27AM

35
#613 - Jesse Brown / @bionicpill

12/29/2010 at 12:43AM

35
#614 - John Reitano / @johnreitano

12/29/2010 at 12:50AM

35
#615 - Samuel / @Namgnoi

01/31/2013 at 09:32PM

35
#616 - vim_golf_account_0009 / @0009Vim9921

05/16/2023 at 02:31PM

36
#617 - Alfredo Deza / @alfredodeza

12/29/2010 at 01:33AM

36
#618 - Steve Klabnik / @steveklabnik

12/29/2010 at 03:10AM

37
#619 - 3eneliath / @3eneliath

03/22/2024 at 10:21PM

38
#620 - Hendrik Nigul / @nigulh

12/29/2010 at 01:40PM

40
#621 - Rohit Nair / @rohitnair

12/29/2010 at 03:39AM

41
#622 - DLKS-Daniel / @DLKS-Daniel

10/04/2024 at 10:31AM

44
#623 - Timothy Hahn / @timyhahn

04/20/2012 at 03:52AM

46
#624 - Pete O'Grady / @peteog

01/04/2011 at 11:35AM

49
#625 - RM / @27r72

11/12/2023 at 10:25AM

50
#626 - Folke Lemaitre / @Folke

11/24/2011 at 09:37PM

52
#627 - tinco / @tinco

12/29/2010 at 03:26PM

54
#628 - jonbell17 / @jonbell17

12/30/2010 at 07:49PM

54
#629 - GE1S7 / @GE1S7

06/27/2024 at 11:40AM

56
#630 - Levon Lloyd / @levonlloyd

02/04/2011 at 04:08PM