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

0 comments


Created by: @kaddkaka

40 active golfers, 171 entries

Leaderboard (lowest score wins):
21
#1 - Saki Gw / @Sakigw

05/18/2020 at 05:53AM

21
#2 - Jonáš Šerých / @serycjon

05/18/2020 at 11:06AM

21
#3 - せいほう / @FICSQF

05/18/2020 at 02:25PM

21
#4 - John Braxler / @braxler

05/20/2020 at 06:30PM

21
#5 - 王有铭 / @wangyouming1209

05/22/2020 at 09:58AM

21
#6 - Finlay l͓̽o͓̽c͓̽k͓̽e͓̽d͓̽d͓̽o͓̽w͓̽n͓̽ McAfee / @finsqm

05/23/2020 at 04:54PM

22
#7 - Toby Hawkins / @Toby_Hawkins

05/17/2020 at 11:54PM

22
#8 - Jon Krause / @jkrause314

05/18/2020 at 02:56AM

22
#9 - Quentin Leroy / @qnleroy

05/18/2020 at 04:12PM

22
#10 - Kevin Keefe / @KevinKeefe5

05/18/2020 at 04:30PM

22
#11 - Smylers / @Smylers2

05/18/2020 at 07:20PM

22
#12 - Jake Van Alstyne / @jake_va

05/18/2020 at 10:07PM

22
#13 - Ebi / @ehan6

05/19/2020 at 05:50AM

22
#14 - haipeng li / @HaipengLie

05/21/2020 at 06:05AM

22
#15 - garry quested / @GQuested

05/21/2020 at 10:31AM

22
#16 - Christophe Robillard / @krichtof

05/21/2020 at 08:37PM

22
#17 - 于吉星 / @fishermryn

05/22/2020 at 03:18AM

22
#18 - Jewi / @j3wi

05/22/2020 at 11:30PM

22
#19 - Sheng Xi / @shenghsi

05/23/2020 at 06:55AM

22
#20 - Commence Corporation / @CommenceCorp

05/23/2020 at 12:49PM

22
#21 - Kai.Li / @KaiLi19

05/24/2020 at 11:29AM

22
#22 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:23PM

22
#23 - Ryan Nevius / @ryannevius

05/24/2020 at 08:12PM

23
#24 - floyd / @floyd10086

05/20/2020 at 08:10AM

24
#25 - Seve / @__Seve__

05/18/2020 at 06:35AM

27
#26 - Jérémy Caldas / @jeremcs

05/22/2020 at 07:05PM

27
#27 - Miłosz Łakomy / @foobar01123

05/23/2020 at 10:18AM

28
#28 - Romeo Valentin / @Seecez

05/18/2020 at 06:40PM

28
#29 - Wayne / @lilwayne15561

05/22/2020 at 02:44AM

29
#30 - Ali Aslan / @AliAsla95742367

05/22/2020 at 05:33AM