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):
22
#181 - Marcin Paliwoda / @eukaliptuss

08/25/2017 at 01:45PM

22
#182 - jirgn / @jirgn

09/24/2017 at 01:18PM

22
#183 - Elton Kamami / @pixel_grid

10/09/2017 at 07:23PM

22
#184 - Ron Alexssen / @Ralexhere

10/18/2017 at 04:20PM

22
#185 - Gregor / @Gregor07899789

10/20/2017 at 08:48PM

22
#186 - Nathanael / @ngsilverman

05/09/2018 at 04:21AM

22
#187 - Justin Hoyt / @JustinHoyt24

06/24/2018 at 02:29AM

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

07/11/2018 at 05:59AM

22
#189 - qed / @qed13308565

07/24/2018 at 06:48PM

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

08/22/2018 at 03:41PM

22
#191 - Chirag Joshi / @thechijos

08/27/2018 at 05:54AM

22
#192 - unclewangshushu / @shuwushu

12/29/2018 at 11:43AM

22
#193 - Mateen Ulhaq / @sicariusnoctis

02/12/2019 at 05:45AM

22
#194 - zenwalker / @zenwalker93

03/11/2019 at 05:29PM

22
#195 - Ivo Blöchliger / @aigledesalpes

08/05/2019 at 02:21PM

22
#196 - Laurent Atlan / @laurentatlan1

06/19/2021 at 09:14PM

22
#197 - mevmev / @mevmev8

09/20/2021 at 05:29PM

22
#198 - D. 👋 / @DCT_cpp

02/11/2022 at 11:44AM

23
#199 - Bruno / @ShadowDancer437

05/15/2017 at 04:16AM

23
#200 - mwatkward / @AftrschoolSpe

05/15/2017 at 10:05PM

23
#201 - eric & the a6 / @EricAnti4r

05/15/2017 at 11:54PM

23
#202 - Pablo / @suspekt007

05/17/2017 at 02:06AM

23
#203 - blamitter ✏️ / @blamitter

05/17/2017 at 01:55PM

23
#204 - Jeff Rimko / @jeffrimko

05/18/2017 at 01:27AM

23
#205 - Bjoern M. Wibben / @bjoernwibben

05/18/2017 at 08:41AM

23
#206 - almostdvs / @almostdvs

05/23/2017 at 02:26AM

23
#207 - squid / @zerosquid

05/26/2017 at 11:58PM

23
#208 - Kranzy / @CrazyKranzy

05/30/2017 at 02:42AM

23
#209 - James / @Dronak

05/31/2017 at 01:09AM

23
#210 - Richard Ivan / @Richard_Ivan

06/02/2017 at 08:54PM