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 591903ff3060ed0b32000007

Adam's challenge

Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.

Start file
<div>
    <span class="text-base text-dark wt-normal">
        @icon('line-graph', 'icon-sm text-dark-faint m-r-4') ${{ number_format($product->totalRevenue() / 100) }}
    </span>
    <span class="text-base text-dark wt-normal">
        @icon('users', 'icon-sm text-dark-faint m-r-4') {{ $product->totalPurchases() }}
    </span>
</div>
End file
<div>
    <span class="text-base text-dark wt-bold">
        @icon('line-graph', 'icon-sm text-dark-faint m-r-2') ${{ number_format($product->totalRevenue() / 100) }}
    </span>
    <span class="text-base text-dark wt-bold">
        @icon('users', 'icon-sm text-dark-faint m-r-2') {{ $product->totalPurchases() }}
    </span>
</div>

View Diff

2,3c2,3
<     <span class="text-base text-dark wt-normal">
<         @icon('line-graph', 'icon-sm text-dark-faint m-r-4') ${{ number_format($product->totalRevenue() / 100) }}
---
>     <span class="text-base text-dark wt-bold">
>         @icon('line-graph', 'icon-sm text-dark-faint m-r-2') ${{ number_format($product->totalRevenue() / 100) }}
5,6c5,6
<     <span class="text-base text-dark wt-normal">
<         @icon('users', 'icon-sm text-dark-faint m-r-4') {{ $product->totalPurchases() }}
---
>     <span class="text-base text-dark wt-bold">
>         @icon('users', 'icon-sm text-dark-faint m-r-2') {{ $product->totalPurchases() }}

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 251 remaining solutions by signing in and submitting your own entry
#252 Krystle / @krystle_test - Score: 55 - 05/17/17 @ 06:32
:%s/t<BS>wt-normal/wt-bold<CR><Down><Right>i:w<BS><BS><Esc>:w%<BS><BS><BS>:%s/r-4/r-2<CR><Esc>:wq<CR>

0 comments


Created by: @TresErresCo

252 active golfers, 904 entries

Leaderboard (lowest score wins):
24
#211 - David Gustavsson / @mrGustaphe

06/08/2017 at 06:25AM

24
#212 - Benoit Bou / @3enoit3

06/17/2017 at 10:25AM

24
#213 - Jules / @namebrandloser

10/26/2018 at 11:46PM

24
#214 - majo senf / @majo_senf

06/18/2019 at 07:10AM

25
#215 - Ryan Coopersmith / @RyanCoopersmit1

06/03/2017 at 03:50PM

25
#216 - Avian Y / @y_avian

06/27/2017 at 03:26PM

25
#217 - Paul Inc / @hiniol1982

08/01/2017 at 09:03PM

25
#218 - Ahmed Hasan / @ahmedrhasan

12/23/2017 at 04:13AM

25
#219 - Akilan Anbalagan / @akilananb

03/27/2018 at 03:46AM

25
#220 - sspan / @sspantz

07/12/2018 at 01:49AM

25
#221 - José / @AngelGaldamez

08/31/2019 at 12:57AM

26
#222 - python-tweepy / @python_tweepy

05/16/2017 at 03:55AM

26
#223 - Alex Hallam / @alexhallam6_28

06/04/2017 at 05:22AM

26
#224 - Kieron Browne / @KieronBrowne1

06/30/2017 at 09:10AM

26
#225 - Sergio Semedi / @SergioSemedi

07/16/2017 at 01:31PM

26
#226 - Geoff / @RealGeoffErwin

09/29/2017 at 01:16PM

26
#227 - Pumpkin Parapet / @PumpkinParapet

10/06/2018 at 03:43PM

26
#228 - Chris G / @AboutThatThing

06/10/2019 at 08:03PM

26
#229 - Brandon Harrison / @llAboutB

09/24/2019 at 10:24PM

27
#230 - Gurukandhamoorthi / @Gurukandhamoor1

07/09/2017 at 04:23PM

27
#231 - Phil Devitt / @GeneralHav0k

01/02/2019 at 04:40PM

27
#232 - 王有铭 / @wangyouming1209

02/24/2019 at 10:41AM

28
#233 - John Doe Jr / @bf4648

06/04/2017 at 05:40AM

28
#234 - ~ben / @nebsirrah

06/20/2017 at 04:42PM

28
#235 - Bruce Adams / @bruceadams1054

10/06/2018 at 09:56AM

28
#236 - Vim Golfer / @VimGolfer6

08/24/2019 at 11:08AM

28
#237 - kafang plays vimgolf / @KafangV

12/18/2020 at 10:25AM

29
#238 - Juho Härme / @jharme

05/22/2017 at 07:39PM

29
#239 - Lukas Galke / @_lpag

05/31/2017 at 08:59PM

29
#240 - niwatoco / @yoshitune9

07/19/2018 at 07:26PM