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

276 active golfers, 1009 entries

Leaderboard (lowest score wins):
25
#241 - Akilan Anbalagan / @akilananb

03/27/2018 at 03:46AM

25
#242 - sspan / @sspantz

07/12/2018 at 01:49AM

25
#243 - Aioriya / @AioriyaDonk

08/31/2019 at 12:57AM

26
#244 - python-tweepy / @python_tweepy

05/16/2017 at 03:55AM

26
#245 - Alex Hallam / @alexhallam6_28

06/04/2017 at 05:22AM

26
#246 - Kieron Browne / @KieronBrowne1

06/30/2017 at 09:10AM

26
#247 - Sergio Semedi / @SergioSemedi

07/16/2017 at 01:31PM

26
#248 - Geoff / @RealGeoffErwin

09/29/2017 at 01:16PM

26
#249 - Pumpkin Parapet / @PumpkinParapet

10/06/2018 at 03:43PM

26
#250 - Chris G / @AboutThatThing

06/10/2019 at 08:03PM

26
#251 - Brandon Harrison / @llAboutB

09/24/2019 at 10:24PM

26
#252 - Marius Ropotica / @cipmar

04/05/2024 at 06:29PM

26
#253 - 🥚 / @schmarles_

11/10/2024 at 10:33PM

27
#254 - Gurukandhamoorthi / @Gurukandhamoor1

07/09/2017 at 04:23PM

27
#255 - Phil Devitt / @GeneralHav0k

01/02/2019 at 04:40PM

27
#256 - 王有铭 / @wangyouming1209

02/24/2019 at 10:41AM

28
#257 - John Doe Jr / @bf4648

06/04/2017 at 05:40AM

28
#258 - ~ben / @nebsirrah

06/20/2017 at 04:42PM

28
#259 - Bruce Adams / @bruceadams1054

10/06/2018 at 09:56AM

28
#260 - Vim Golfer / @VimGolfer6

08/24/2019 at 11:08AM

28
#261 - kafang plays vimgolf / @KafangV

12/18/2020 at 10:25AM

29
#262 - Juho Härme / @jharme

05/22/2017 at 07:39PM

29
#263 - Lukas Galke / @_lpag

05/31/2017 at 08:59PM

29
#264 - niwatoco / @yoshitune9

07/19/2018 at 07:26PM

30
#265 - Paul Jones / @thepauljones

06/21/2018 at 02:43PM

30
#266 - vimgolfer1234 / @vimgolfer12342

10/25/2018 at 12:49AM

30
#267 - Luis Rodriguez / @luisthecoder

11/14/2018 at 11:30PM

30
#268 - Jurica / @Jurica34581259

11/16/2018 at 11:53AM

30
#269 - Zach Russell / @ZacharyRRussell

02/07/2019 at 03:33PM

31
#270 - Kristof Jozsa / @kjozsa

02/15/2019 at 07:39PM