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

607 active golfers, 1646 entries

Leaderboard (lowest score wins):
23
#301 - Francois Marais / @maraisf

07/31/2014 at 01:40PM

23
#302 - Tj / @yrddy

08/19/2014 at 03:11AM

23
#303 - Greg / @developergreg

09/09/2014 at 01:31AM

23
#304 - Pierre Bertet / @bpierre

10/10/2014 at 07:05PM

23
#305 - merphant / @merphant

10/24/2015 at 06:37AM

23
#306 - Robert Goeddel / @f0rdpr3fect

11/10/2015 at 11:37PM

23
#307 - Dimitar Dimitrov / @kurkale6ka

03/17/2016 at 04:55PM

23
#308 - ramandeep randhawa / @rsrandhawa

04/10/2016 at 10:29PM

23
#309 - Will / @obiwan__k3n00bi

07/31/2016 at 08:51PM

23
#310 - jakeroberts / @jakeroberts

05/27/2017 at 07:59PM

23
#311 - Florian Gauger / @FlorianGauger

06/06/2017 at 01:01AM

23
#312 - Brendan B Amdocs / @AmdocsB

09/25/2018 at 04:33PM

23
#313 - Mihai / @mihaicristiant

12/27/2018 at 01:27PM

23
#314 - Vimfiz / @vimfiz

05/06/2019 at 09:51PM

23
#315 - Chester Yap / @Chest_ErYap

08/03/2019 at 07:14PM

23
#316 - Vim Player / @PlayerVim

10/07/2019 at 02:18PM

23
#317 - Lory / @Lory46845742

11/20/2019 at 12:57PM

23
#318 - iBhagwan / @iiBhagwan

06/04/2020 at 05:12PM

23
#319 - Michel Viktor / @tomkpz

08/11/2021 at 07:45PM

23
#320 - Dmitry / @MsDosLite

08/16/2021 at 02:39PM

23
#321 - Sean Cahill / @ess_jay_kay

11/01/2021 at 03:40PM

23
#322 - POSIX / @po6ix

01/10/2022 at 01:33AM

23
#323 - shahanavaz m / @shahanavazm

02/12/2022 at 10:38PM

23
#324 - blabla zincou / @BZincou

03/09/2022 at 08:02PM

23
#325 - x03n046 / @x03n046

05/13/2022 at 05:18AM

23
#326 - Brandon / @Brandon10678836

08/31/2022 at 11:47PM

23
#327 - jimmarq / @jimmarq

11/01/2022 at 07:00PM

23
#328 - Geek Boy / @Geek79

11/08/2022 at 10:18PM

23
#329 - Qishuai Liu / @LiuQishuai

01/10/2023 at 01:14PM

23
#330 - Berkay Berabi / @BerkayBerabi

05/01/2023 at 05:17PM