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):
30
#241 - Paul Jones / @thepauljones

06/21/2018 at 02:43PM

30
#242 - vimgolfer1234 / @vimgolfer12342

10/25/2018 at 12:49AM

30
#243 - Luis Rodriguez / @luisthecoder

11/14/2018 at 11:30PM

30
#244 - Jurica / @Jurica34581259

11/16/2018 at 11:53AM

30
#245 - Zach Russell / @ZacharyRRussell

02/07/2019 at 03:33PM

31
#246 - Kristof Jozsa / @kjozsa

02/15/2019 at 07:39PM

34
#247 - fff / @fff51460170

02/21/2021 at 06:42AM

37
#248 - Cody Loyd / @codyloyd

06/14/2017 at 05:24PM

39
#249 - Jared Thomas / @jthomas285

05/15/2017 at 11:20PM

41
#250 - band / @band26376522

12/04/2018 at 11:30PM

46
#251 - Aaron / @_Lordofthevoid_

12/01/2019 at 02:24PM

55
#252 - Krystle / @krystle_test

05/17/2017 at 06:32AM