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

492 active golfers, 1267 entries

Leaderboard (lowest score wins):
22
#151 - mark0829 / @mark0829

02/06/2015 at 06:46AM

22
#152 - TheProgrammer971 / @tp971

03/13/2015 at 10:27PM

22
#153 - pftb12345 / @pftb12345

04/09/2015 at 05:23AM

22
#154 - Rathrio / @Rathrio

04/29/2015 at 07:09PM

22
#155 - Jon Krause / @jkrause314

01/05/2016 at 09:56PM

22
#156 - Aleksey Zhidkov / @AlexeyZhidkov

03/10/2016 at 05:26AM

22
#157 - tPenguinLTG / @tpenguinltg

05/13/2016 at 02:06AM

22
#158 - Ben Hill / @KaizenSoze70

05/26/2016 at 12:18PM

22
#159 - T. Sakuma / @taku39

06/18/2016 at 02:04PM

22
#160 - Ameen P / @Ameen_P1

06/18/2016 at 11:05PM

22
#161 - we’re going to need a bigger bot / @assaflavie

07/09/2016 at 06:01PM

22
#162 - Pavol Slamka / @Archipedes

07/14/2016 at 11:49PM

22
#163 - jj johnson / @jcassj1

08/23/2016 at 09:10AM

22
#164 - Saurav Mitra / @SauravMitra11

12/31/2016 at 10:56AM

22
#165 - Pierre Maoui / @poupougnac

12/31/2016 at 11:18AM

22
#166 - Zhihong Liu / @pieapple03

03/03/2017 at 04:23PM

22
#167 - Rami Hovi / @hacker_lawyer

05/27/2017 at 12:30PM

22
#168 - Bennett Bernardoni / @BBernardoni

07/03/2017 at 09:35PM

22
#169 - 杨洋 / @176795444

07/16/2017 at 09:05AM

22
#170 - mkl / @Hnr1zklc

10/26/2017 at 10:06AM

22
#171 - Turkey Man / @lvturkeyman

11/20/2017 at 04:18PM

22
#172 - BarbaJol / @drpproteus

01/02/2018 at 07:14PM

22
#173 - c0llision / @sh3llcode

01/27/2018 at 10:57PM

22
#174 - LC / @leeren

03/02/2018 at 11:59PM

22
#175 - DHM / @DHM29978992

04/29/2018 at 11:41PM

22
#176 - Kerson Hsiao / @KersonHsiao

07/07/2018 at 08:41AM

22
#177 - name / @name65894813

11/26/2018 at 06:08PM

22
#178 - Dax / @zacoxi

12/04/2018 at 03:43AM

22
#179 - alekfed / @alek_fed

04/16/2019 at 09:40AM

22
#180 - Gitsnik / @dracyrys

05/04/2019 at 01:31PM