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):
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 / @ilya-shakirov

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

23
#233 - Mathias Rav / @iaddquotes

12/29/2010 at 01:29AM

23
#234 - dagbrown / @dagbrown

12/29/2010 at 08:03AM

23
#235 - foo bar / @whoever_foo

12/29/2010 at 08:15AM

23
#236 - Nadja Untendiegruft / @nadjau

12/29/2010 at 01:14PM

23
#237 - Kornél Lugosi / @Coornail

12/29/2010 at 04:30PM

23
#238 - Dan Smith / @untermrad

12/30/2010 at 09:57PM

23
#239 - Yannick LM / @yanicklm

12/30/2010 at 11:17PM

23
#240 - Vincent Isambart / @vincentisambart

12/31/2010 at 11:29AM