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

271 active golfers, 987 entries

Leaderboard (lowest score wins):
19
#121 - Vimfiz / @vimfiz

03/29/2019 at 11:05PM

19
#122 - james_bunch / @james_bunch

05/04/2019 at 04:43AM

19
#123 - Chester Yap / @Chest_ErYap

07/22/2019 at 12:06PM

19
#124 - Lory / @Lory46845742

11/14/2019 at 07:52AM

19
#125 - countime / @countime1

03/13/2020 at 08:56AM

19
#126 - 薛浩滎 / @iTPChbTeI4ZW9s3

03/17/2020 at 11:00PM

19
#127 - Ming Dai / @MingDai2

07/01/2020 at 04:55PM

19
#128 - Jean George / @JeanGeo20504212

10/01/2021 at 02:22PM

19
#129 - vladanscy / @vladanscy

02/20/2023 at 09:20PM

19
#130 - Nathan Priego / @nspriego

03/02/2025 at 04:49AM

20
#131 - Durga Swaroop Perla / @durgaswaroop

05/15/2017 at 12:11PM

20
#132 - cook / @mattcook08

05/15/2017 at 09:04PM

20
#133 - jakeroberts / @jakeroberts

05/19/2017 at 01:12PM

20
#134 - 杨洋 / @176795444

08/13/2017 at 08:51AM

20
#135 - Chris AtLee / @chrisatlee

03/02/2019 at 01:03AM

20
#136 - Jason / @roosjason

05/24/2020 at 02:34AM

20
#137 - jonas-grobe / @jonas-grobe

02/03/2024 at 08:48PM

21
#138 - tPenguinLTG / @tpenguinltg

05/15/2017 at 01:58AM

21
#139 - Daniel K. / @lan4k

05/15/2017 at 06:27AM

21
#140 - PL / @petrlaitoch

05/16/2017 at 10:04AM

21
#141 - Sylvia / @SylvieLorxu

05/16/2017 at 09:18PM

21
#142 - Cristian Lupașcu / @clupasq

05/18/2017 at 10:57AM

21
#143 - Yossi Zahn / @yossi_zahn

05/21/2017 at 07:18PM

21
#144 - Brian Hall / @_bruab_

05/22/2017 at 01:41PM

21
#145 - Utkrisht Dhankar / @UtkrishtDhankar

05/24/2017 at 10:00AM

21
#146 - David / @Revan4Vendetta

05/26/2017 at 10:59AM

21
#147 - Adam Bozanich / @abozanich

06/08/2017 at 02:19AM

21
#148 - Tom Sisk / @TomSisk

06/21/2017 at 12:56AM

21
#149 - Stop and think / @ms_uncountable

07/07/2017 at 08:12PM

21
#150 - Scott Mills / @smm1729

07/11/2017 at 08:04PM