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

270 active golfers, 984 entries

Leaderboard (lowest score wins):
18
#1 - Urtica dioica / @udioica

05/15/2017 at 04:19AM

18
#2 - Smylers / @Smylers2

05/15/2017 at 05:58AM

18
#3 - Chris Robertson / @chrisxrobertson

05/15/2017 at 10:43AM

18
#4 - Valacar / @valacar

05/15/2017 at 08:33PM

18
#5 - Craig Langford / @cllangfo

05/15/2017 at 09:26PM

18
#6 - ЯRicardo / @TresErresCo

05/15/2017 at 10:04PM

18
#7 - Vaughn Cato / @vaughncato

05/16/2017 at 03:59AM

18
#8 - Saki Gw / @Sakigw

05/16/2017 at 07:15AM

18
#9 - John Braxler / @braxler

05/16/2017 at 03:39PM

18
#10 - Russell Ball / @rtball2

05/16/2017 at 10:28PM

18
#11 - Rami Hovi / @hacker_lawyer

05/19/2017 at 01:37PM

18
#12 - Nelson Zhang / @Fasoters

05/19/2017 at 05:38PM

18
#13 - martin tourneboeuf / @martintournebo1

05/21/2017 at 10:50AM

18
#14 - Domingue Justin / @_jdomingue

05/21/2017 at 05:04PM

18
#15 - ʀǟɦʊʟ ɮɦօʟǟ / @theRahulBhola

05/21/2017 at 05:10PM

18
#16 - Rodrigo Dorantes G. / @ruydg

05/21/2017 at 06:16PM

18
#17 - Petro Тrouq / @zulolosi

05/21/2017 at 09:55PM

18
#18 - 梧桐王子 / @WutongYujie

05/22/2017 at 01:15AM

18
#19 - Melvin Cheung / @MelvinCheung

05/22/2017 at 05:37PM

18
#20 - Parker Vaughn / @parker789

05/23/2017 at 01:38PM

18
#21 - Jason Villanueva / @Json_V1

05/24/2017 at 07:52AM

18
#22 - Jan Fiser / @dmmn082

05/25/2017 at 02:54AM

18
#23 - ybw / @yossibenwolf

05/25/2017 at 09:53AM

18
#24 - Tomas Sikula / @tomsmicroblog

05/26/2017 at 05:57PM

18
#25 - Simon / @simonpaitu

05/28/2017 at 02:43PM

18
#26 - TongHyun Kim / @crowdy

05/30/2017 at 02:14PM

18
#27 - ssh89 / @ssh89

06/04/2017 at 06:30PM

18
#28 - Michael Buckley / @apolatg

06/13/2017 at 09:31PM

18
#29 - Rakesh P / @rakeshpgopal

06/15/2017 at 01:47PM

18
#30 - Joel Meyer-Hamme / @JoelMeyerHamme

06/18/2017 at 02:24PM