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):
23
#271 - Hachez Floran / @FloranHachez

09/04/2013 at 08:33AM

23
#272 - brett / @brettyukich

09/21/2013 at 09:26AM

23
#273 - Steven Weller / @suweller

09/27/2013 at 11:06AM

23
#274 - bunnies president / @bunnies4p

10/27/2013 at 10:34PM

23
#275 - Casey Dwyer / @caseydwyer

11/04/2013 at 02:10AM

23
#276 - US Dollar Price / @USDollarPrice

11/06/2013 at 05:59AM

23
#277 - gary.klindt@googlema / @garstekli

11/26/2013 at 04:30PM

23
#278 - Zach Kemp / @zvksf

12/20/2013 at 12:58AM

23
#279 - John Gray Cole / @johngraycole

02/14/2014 at 01:17AM

23
#280 - Robert Siemieniec / @rsiemieniec

04/10/2014 at 10:08AM

23
#281 - lastsseldon / @lastsseldon

05/10/2014 at 03:34AM

23
#282 - Ram Tamtam / @ramtamtamtam

06/30/2014 at 09:57AM

23
#283 - playalong / @playwithit42

07/16/2014 at 08:52AM

23
#284 - Rails Girls Tel-Aviv / @RailsGirlsTLV

07/27/2014 at 02:08PM

23
#285 - Francois Marais / @maraisf

07/31/2014 at 01:40PM

23
#286 - Tj / @yrddy

08/19/2014 at 03:11AM

23
#287 - Greg / @developergreg

09/09/2014 at 01:31AM

23
#288 - Pierre Bertet / @bpierre

10/10/2014 at 07:05PM

23
#289 - merphant / @merphant

10/24/2015 at 06:37AM

23
#290 - Robert Goeddel / @f0rdpr3fect

11/10/2015 at 11:37PM

23
#291 - Dimitar Dimitrov / @kurkale6ka

03/17/2016 at 04:55PM

23
#292 - ramandeep randhawa / @rsrandhawa

04/10/2016 at 10:29PM

23
#293 - Will / @obiwan__k3n00bi

07/31/2016 at 08:51PM

23
#294 - jakeroberts / @jakeroberts

05/27/2017 at 07:59PM

23
#295 - Florian Gauger / @FlorianGauger

06/06/2017 at 01:01AM

23
#296 - Brendan B Amdocs / @AmdocsB

09/25/2018 at 04:33PM

23
#297 - Mihai / @mihaicristiant

12/27/2018 at 01:27PM

23
#298 - Vimfiz / @vimfiz

05/06/2019 at 09:51PM

23
#299 - Chester Yap / @Chest_ErYap

08/03/2019 at 07:14PM

23
#300 - Vim Player / @PlayerVim

10/07/2019 at 02:18PM