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

612 active golfers, 1659 entries

Leaderboard (lowest score wins):
22
#181 - ImaNotgate / @INotgate

05/09/2019 at 07:08PM

22
#182 - Magnus Bjuvensjö / @mbjuvensjo

06/12/2019 at 10:32PM

22
#183 - majo senf / @majo_senf

06/21/2019 at 01:26PM

22
#184 - Brandon Harrison / @llAboutB

09/25/2019 at 03:48PM

22
#185 - Tamás Kárándi / @tkarandi

10/19/2019 at 12:00PM

22
#186 - Melvin Cheung / @MelvinCheung

11/12/2019 at 03:53AM

22
#187 - Viktor Styrud / @ViktorStyrud

11/28/2019 at 04:14PM

22
#188 - Miłosz Łakomy / @foobar01123

12/12/2019 at 10:30AM

22
#189 - Victor / @victor_rma

04/24/2020 at 02:34AM

22
#190 - Scott Atkins / @scottrick49

06/23/2021 at 02:24PM

22
#191 - Jung Yeon Park / @park_jungy

08/09/2021 at 07:04PM

22
#192 - const { andre } = scalco; / @andre_scalco

12/02/2021 at 01:23AM

22
#193 - Jean George / @JeanGeo20504212

01/07/2022 at 02:44PM

22
#194 - Andreas Siegrist / @andreaszwei

02/01/2022 at 08:02PM

22
#195 - Ofer Yehuda / @OferYehuda

02/19/2022 at 02:02PM

22
#196 - Tyler Carson / @tylerccarson

03/18/2022 at 11:08PM

22
#197 - russellzhaomao / @russellzhaomao

05/25/2022 at 03:09AM

22
#198 - josh / @_zvjos

06/19/2022 at 01:12AM

22
#199 - Qing Liu / @poeminlash

07/02/2022 at 03:00AM

22
#200 - Plicatibu / @plicatibu

08/13/2022 at 07:39PM

22
#201 - Andreas Näsman / @andreas_nasman

08/30/2022 at 06:21PM

22
#202 - 刘宏亮 / @AkeyCoy

09/24/2022 at 02:17PM

22
#203 - Omar Alawadhi / @OmarAla59544225

10/19/2022 at 10:18PM

22
#204 - math is what I hate / @mpnmbn

10/29/2022 at 06:57PM

22
#205 - Gs Abl / @gs_abl

11/25/2022 at 02:52PM

22
#206 - vuems / @vuems2win

11/26/2022 at 12:49PM

22
#207 - Alexei Eleusis Díaz / @alexeieleusis

01/01/2023 at 04:19PM

22
#208 - Zion Park / @zionpark93

01/04/2023 at 05:53PM

22
#209 - Александр Моисеев / @Aleksan43607471

01/20/2023 at 02:40PM

22
#210 - Alex Lewin / @_AlexLewin

02/22/2023 at 06:59AM