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

609 active golfers, 1649 entries

Leaderboard (lowest score wins):
22
#211 - Michel Ehmen / @MichelEhmen

08/11/2023 at 03:38PM

22
#212 - Tim Sabsch / @tsabsch

08/11/2023 at 03:38PM

22
#213 - FeAx / @_FeAx_

10/10/2023 at 02:57PM

22
#214 - scpchicken / @scpchick

10/31/2023 at 06:11PM

22
#215 - Chris Atanasian / @chrisatanasian

11/24/2023 at 07:04AM

22
#216 - Simo Kivistö / @kivissimo

02/08/2024 at 01:09PM

22
#217 - evgenii-kokorin / @evgenii-kokorin

02/14/2024 at 10:21AM

22
#218 - Ilya Shakirov / @aelaau

03/11/2024 at 03:29PM

22
#219 - Andy / @andyfoster

04/05/2024 at 09:00AM

22
#220 - schrjako / @schrjako

04/06/2024 at 09:02AM

22
#221 - wihinenh / @wihinenh

05/01/2024 at 03:28PM

22
#222 - Aly Thobani / @alythobani

05/27/2024 at 10:24PM

22
#223 - Petro Mudrievskyj / @petemud

06/29/2024 at 01:24AM

22
#224 - Austin Abell / @austinabell

06/29/2024 at 09:05PM

22
#225 - Nikita Rvachev / @rvnikita

08/01/2024 at 09:40PM

22
#226 - Tsimon Dorakh / @Tsimon-Dorakh

08/10/2024 at 08:11AM

22
#227 - KarateSnoopy / @KarateSnoopy

08/14/2024 at 10:09AM

22
#228 - George Oversby / @GeorgeOversby

08/16/2024 at 03:48PM

22
#229 - Diwakar Singh Parmar / @parmardiwakar150

08/27/2024 at 01:50PM

22
#230 - nickGPT / @nickandbro

08/29/2024 at 12:28AM

22
#231 - Suhaib Murshid / @suhaibm

08/31/2024 at 04:42AM

22
#232 - menb / @menb111

09/09/2024 at 09:19AM

22
#233 - tofitsch / @tofitsch

10/06/2024 at 09:07AM

22
#234 - Peppa Pig / @PeppaPigSg

10/09/2024 at 10:00AM

22
#235 - jfdg01 / @jfdg01

10/20/2024 at 10:44AM

22
#236 - Elliot Schemmel / @regulated

10/29/2024 at 07:40PM

22
#237 - Andrew / @a0di

11/02/2024 at 05:12PM

22
#238 - countime / @countime

11/27/2024 at 03:29PM

22
#239 - Oleksii Sanin / @AlexSanin

12/07/2024 at 02:12PM

22
#240 - interminable007 / @interminable007

01/04/2025 at 03:07PM