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):
21
#151 - pankaj singh / @pankajsingh013

01/30/2019 at 03:33PM

21
#152 - TimMcGuire / @mcguire

02/06/2019 at 07:34PM

21
#153 - Jason Neylon / @jasonneylon

03/05/2020 at 10:33PM

22
#154 - Ryan Jarrett / @texmexas

05/15/2017 at 03:51PM

22
#155 - Shriharsh / @ShriharshMishra

05/15/2017 at 03:57PM

22
#156 - Bruce Horner / @HerbConjurer

05/16/2017 at 01:06AM

22
#157 - Quatrix / @Quatrix

05/23/2017 at 08:47PM

22
#158 - Nathan Slaughter / @NjSlaughter

05/24/2017 at 12:35AM

22
#159 - Carl Egbert / @CarlOEgbert

06/09/2017 at 06:08AM

22
#160 - Emmanuel Herrero / @hairarrow

06/15/2017 at 07:22PM

22
#161 - John Smith / @john828495

06/16/2017 at 02:06PM

22
#162 - John Smith / @johns32768

06/16/2017 at 06:47PM

22
#163 - Matt Fister / @Mistah_Fistah

06/23/2017 at 02:01AM

22
#164 - squdle / @squdle

06/30/2017 at 12:45PM

22
#165 - grigouille / @grigouille2

07/05/2017 at 08:24PM

22
#166 - Anne Pacalet / @_Anne_P

07/06/2017 at 11:22AM

22
#167 - devoh / @devvohh

08/06/2017 at 07:25PM

22
#168 - Marcin Paliwoda / @eukaliptuss

08/25/2017 at 01:45PM

22
#169 - jirgn / @jirgn

09/24/2017 at 01:18PM

22
#170 - Elton Kamami / @pixel_grid

10/09/2017 at 07:23PM

22
#171 - Ron Alexssen / @Ralexhere

10/18/2017 at 04:20PM

22
#172 - Gregor / @Gregor07899789

10/20/2017 at 08:48PM

22
#173 - Nathanael / @ngsilverman

05/09/2018 at 04:21AM

22
#174 - Justin Hoyt / @JustinHoyt24

06/24/2018 at 02:29AM

22
#175 - 赤佐田奈葉 / @akasatanaha_

07/11/2018 at 05:59AM

22
#176 - qed / @qed13308565

07/24/2018 at 06:48PM

22
#177 - Víctor López / @viticlick

08/22/2018 at 03:41PM

22
#178 - Chirag Joshi / @thechijos

08/27/2018 at 05:54AM

22
#179 - unclewangshushu / @shuwushu

12/29/2018 at 11:43AM

22
#180 - Mateen Ulhaq / @sicariusnoctis

02/12/2019 at 05:45AM