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):
18
#61 - platypusDancing / @platypusDancing

05/03/2018 at 07:05PM

18
#62 - c0llision / @sh3llcode

05/27/2018 at 01:07PM

18
#63 - 石奕心 / @allenshih1

06/11/2018 at 08:20PM

18
#64 - Daniël De Koker / @daniel_koker

07/01/2018 at 09:10PM

18
#65 - 村橋究理基M.Kuriki@北大 / @mkuriki_

08/14/2018 at 12:22AM

18
#66 - Hugo / @szeyattai

08/21/2018 at 07:10AM

18
#67 - Jeff / @sir_wiggles3

09/09/2018 at 06:22AM

18
#68 - Rasmus Bergström / @JRasmusBm

09/29/2018 at 09:45PM

18
#69 - Roger Bongers / @RogerBongers

10/05/2018 at 09:36PM

18
#70 - Benjamin Kiesl / @BenjaminKiesl

10/20/2018 at 11:57AM

18
#71 - Sxcy / @SxcyX

10/22/2018 at 08:53PM

18
#72 - vg / @vg53210350

10/28/2018 at 07:48PM

18
#73 - Dax / @zacoxi

11/09/2018 at 05:24AM

18
#74 - Mihai / @mihaicristiant

12/04/2018 at 01:14PM

18
#75 - Sebastien Nicoud / @sebnukem

02/05/2019 at 01:05AM

18
#76 - alekfed / @alek_fed

04/15/2019 at 12:10PM

18
#77 - Gitsnik / @dracyrys

05/04/2019 at 10:55AM

18
#78 - Grant / @grant_7788

05/06/2019 at 02:21AM

18
#79 - Arno / @arnoxmp

05/10/2019 at 03:27PM

18
#80 - Дима / @dimkino

05/30/2019 at 07:30AM

18
#81 - BunFluffman / @BFluffman

06/09/2019 at 07:53PM

18
#82 - mkaminaga / @mkmng3

07/01/2019 at 08:11AM

18
#83 - Miłosz Łakomy / @foobar01123

07/27/2019 at 10:22AM

18
#84 - sooqua / @sooqua

08/09/2019 at 05:02AM

18
#85 - theBecwar / @thebecwar

08/19/2019 at 06:07PM

18
#86 - Viktor Styrud / @ViktorStyrud

10/11/2019 at 11:17AM

18
#87 - vimgolfer / @vimgolfer7

10/22/2019 at 02:22AM

18
#88 - Mario Olofo / @mario_olofo

10/23/2019 at 11:43PM

18
#89 - James Casey / @hanavi

12/22/2019 at 01:11AM

18
#90 - Delon / @delonleonard

01/06/2020 at 11:43PM