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 5ec18a61827ca60009087755

Replace pattern with 1, 2, 3, ... on each line

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

Start file
I can't see the $ for all the $,
But there $ not $ $ tomorrow.
$ she can do $ and 4,
$ the $ in the $ and $ the $.
End file
I can't see the 1 for all the 2,
But there 1 not 2 3 tomorrow.
1 she can do 2 and 4,
1 the 2 in the 3 and 4 the 5.

View Diff

1,4c1,4
< I can't see the $ for all the $,
< But there $ not $ $ tomorrow.
< $ she can do $ and 4,
< $ the $ in the $ and $ the $.
\ No newline at end of file
---
> I can't see the 1 for all the 2,
> But there 1 not 2 3 tomorrow.
> 1 she can do 2 and 4,
> 1 the 2 in the 3 and 4 the 5.
\ No newline at end of file

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 171 remaining solutions by signing in and submitting your own entry
#172 Pettsonator / @Pettsonator - Score: 75 - 05/25/20 @ 20:21
16lr114lr2kj9hhr3jkhhr2hhhhhhr1j0r111lllr26lrju<Esc>j0r16lr29lr36lr46lr5<Esc>:w<CR>:q<CR>

0 comments


Created by: @kaddkaka

172 active golfers, 843 entries

Leaderboard (lowest score wins):
27
#91 - grubeb / @grubeb4

09/25/2020 at 06:00PM

27
#92 - RaylanFox / @RaylanFox

10/02/2020 at 06:49AM

27
#93 - Vinícius Hoyer / @viniciushoyer

10/08/2020 at 02:34PM

27
#94 - AAbraxas / @AAbraxas1

10/08/2020 at 08:36PM

27
#95 - wilsonept / @wilsonept1

10/25/2020 at 01:12PM

27
#96 - pherapont / @pherapont1

12/28/2020 at 10:16AM

27
#97 - Björn Struckmeier / @BjrnStruckmeie1

01/02/2021 at 03:34PM

28
#98 - Romeo Valentin / @Seecez

05/18/2020 at 06:40PM

28
#99 - Wayne / @lilwayne15561

05/22/2020 at 02:44AM

28
#100 - Aidan Wilson / @aidanbwilson

05/28/2020 at 02:12PM

28
#101 - betmaster / @betmstr

05/30/2020 at 11:14AM

28
#102 - serici / @serici

07/02/2020 at 04:49PM

28
#103 - Ivo Blöchliger / @aigledesalpes

07/06/2020 at 07:50PM

28
#104 - mindgitrwx / @mindgitrwx

08/06/2020 at 02:25PM

28
#105 - Ravi S Sinha / @ambidextrousTx

08/25/2020 at 12:56AM

28
#106 - Václav Pernička / @VaclavPernicka

09/05/2020 at 09:29PM

29
#107 - Ali Aslan / @AliAsla95742367

05/22/2020 at 05:33AM

29
#108 - Tzero Ocne / @TzeroOcne

05/26/2020 at 05:12PM

29
#109 - Mateo / @Mateo_BCN

05/29/2020 at 03:06PM

29
#110 - yuval jacoby / @yuval_jacoby

07/20/2020 at 08:39PM

29
#111 - drGsus / @drGsus

07/24/2020 at 06:06PM

30
#112 - Andy / @ayy_ess_

05/23/2020 at 10:37PM

30
#113 - LCY / @Chooneh

06/07/2020 at 04:35AM

30
#114 - Muffin / @Muffin91707986

09/05/2020 at 09:22AM

30
#115 - Chris Conte / @chriscconte

10/02/2020 at 05:16PM

30
#116 - Dmitry Antonyuk / @AntonyukDmitry

10/16/2020 at 03:28PM

30
#117 - 영훈 / @odjfnrtm

01/02/2021 at 07:23AM

31
#118 - 𝓂𝒿𝓇 ∋ ℝ / @real_mjr

05/21/2020 at 09:37AM

31
#119 - Jonathan Striblet / @Telbirts

05/24/2020 at 12:12AM

31
#120 - Alek Mugnozzo / @mugnozzo

05/30/2020 at 07:16AM