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

197 active golfers, 632 entries

Leaderboard (lowest score wins):
19
#91 - Brendan B Amdocs / @AmdocsB

11/02/2018 at 05:42PM

20
#92 - Durga Swaroop Perla / @durgaswaroop

05/15/2017 at 12:11PM

20
#93 - Matt Cook / @mattcook08

05/15/2017 at 09:04PM

20
#94 - jakeroberts / @jakeroberts

05/19/2017 at 01:12PM

20
#95 - 杨洋 / @176795444

08/13/2017 at 08:51AM

21
#96 - tPenguinLTG / @tpenguinltg

05/15/2017 at 01:58AM

21
#97 - Daniel K. / @lan4k

05/15/2017 at 06:27AM

21
#98 - PL / @petrlaitoch

05/16/2017 at 10:04AM

21
#99 - Sylvia / @SylvieLorxu

05/16/2017 at 09:18PM

21
#100 - Cristian Lupașcu / @clupasq

05/18/2017 at 10:57AM

21
#101 - Yossi Zahn / @yossi_zahn

05/21/2017 at 07:18PM

21
#102 - Brian Hall / @_bruab_

05/22/2017 at 01:41PM

21
#103 - Utkrisht Dhankar / @UtkrishtDhankar

05/24/2017 at 10:00AM

21
#104 - David / @Revan4Vendetta

05/26/2017 at 10:59AM

21
#105 - Adam Bozanich / @abozanich

06/08/2017 at 02:19AM

21
#106 - Tom Sisk / @TomSisk

06/21/2017 at 12:56AM

21
#107 - Stop and think / @ms_uncountable

07/07/2017 at 08:12PM

21
#108 - Scott Mills / @smm1729

07/11/2017 at 08:04PM

21
#109 - Preben Guldberg / @wielder

07/24/2017 at 06:00AM

21
#110 - Jonathan Eidsness / @jonathaneidsnes

07/25/2017 at 05:11PM

21
#111 - Daniel / @0x9ABC

08/16/2017 at 04:57PM

21
#112 - Chicuella / @chicuellahere

09/04/2017 at 03:38PM

21
#113 - vimgolfer864 / @vimgolfer864

09/23/2017 at 09:06AM

21
#114 - Charlie OConor / @charlieoconor

10/05/2017 at 09:16PM

21
#115 - sehe / @sehetw

10/10/2017 at 02:19PM

21
#116 - Kaydo Alders / @Yousousen

03/16/2018 at 10:28AM

21
#117 - frank p / @icedearth55

05/05/2018 at 05:54PM

21
#118 - PCS Solutions / @PeteSolutions

08/16/2018 at 04:45AM

22
#119 - Ryan Jarrett / @texmexas

05/15/2017 at 03:51PM

22
#120 - Shriharsh / @ShriharshMishra

05/15/2017 at 03:57PM