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

520 active golfers, 1346 entries

Leaderboard (lowest score wins):
27
#391 - palentine / @palentine

12/12/2011 at 07:39PM

27
#392 - ümit kablan / @udslk

03/11/2012 at 02:11PM

27
#393 - Nolen Royalty / @NolenRoyalty

04/21/2012 at 02:52AM

27
#394 - Yusuke Tsutsumi / @tsutsumiyusuke

05/03/2012 at 12:15AM

27
#395 - Tomas Frostensson / @frostensson

05/22/2012 at 02:47PM

27
#396 - Jake Bell / @theunravelr

05/23/2012 at 04:48PM

27
#397 - Chris Brown / @engineercyb

07/13/2012 at 03:32AM

27
#398 - mlu / @_mlu

07/27/2012 at 07:18AM

27
#399 - Kevin McGladdery / @run_kmc

08/12/2012 at 08:39PM

27
#400 - Dmitry Olyenyov / @Dmitry_Olyenyov

08/22/2012 at 10:46AM

27
#401 - vansan / @VinceVansan

08/23/2012 at 09:26PM

27
#402 - Arto Vuori / @dhpe

08/30/2012 at 08:08PM

27
#403 - Nicolas Friedli / @NicolasFriedli

10/29/2012 at 05:26PM

27
#404 - sathish316 / @sathish316

11/18/2012 at 05:48PM

27
#405 - Ilya Loginov / @_zerone_

02/24/2013 at 10:14PM

27
#406 - くま ก็็็็็็็็็็็็็ʕ•͡ᴥ•ʔ ก้้้้้้้้้้้ 55 / @kumack55

04/03/2013 at 02:42PM

27
#407 - Aaron Josephs / @aaronjosephs1

05/01/2013 at 10:39PM

27
#408 - Kathryn / @hartknyx

05/21/2013 at 05:08AM

27
#409 - Woojung Kim 김우중 / @_kimwz

07/13/2013 at 12:21AM

27
#410 - A / @Tower_1980

07/29/2013 at 01:47PM

27
#411 - James / @Dronak

08/29/2013 at 03:52PM

27
#412 - Stephen Binns / @stephenbinns

09/08/2013 at 03:07PM

27
#413 - engy / @engydmw

09/25/2013 at 09:10PM

27
#414 - wilddog64 / @chengkai318

12/17/2013 at 08:42PM

27
#415 - pikaren / @REALpikaren

01/03/2014 at 03:29AM

27
#416 - João Paiva / @jgpaiva

01/31/2014 at 11:39AM

27
#417 - skensell / @skensell

04/27/2014 at 09:12AM

27
#418 - Talya S / @_tomata

07/27/2014 at 02:09PM

27
#419 - Jake Worth / @jwworth

01/02/2015 at 11:12PM

27
#420 - lpm11 / T. Tsunoda / @lpm11

02/16/2015 at 11:57AM