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

0 comments


Created by: @kaddkaka

106 active golfers, 481 entries

Leaderboard (lowest score wins):
22
#31 - garry quested / @GQuested

05/21/2020 at 10:31AM

22
#32 - 于吉星 / @fishermryn

05/22/2020 at 03:18AM

22
#33 - Jewi / @j3wi

05/22/2020 at 11:30PM

22
#34 - Sheng Xi / @shenghsi

05/23/2020 at 06:55AM

22
#35 - Commence Corporation / @CommenceCorp

05/23/2020 at 12:49PM

22
#36 - Kai.Li / @KaiLi19

05/24/2020 at 11:29AM

22
#37 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:23PM

22
#38 - Ryan Nevius / @ryannevius

05/24/2020 at 08:12PM

22
#39 - chocolate / @chocola81394123

05/26/2020 at 08:14PM

22
#40 - RockerZZY / @rocker_zzy

05/28/2020 at 07:44AM

22
#41 - sunny / @pooisonner

05/28/2020 at 08:21AM

22
#42 - Lili Boi / @lili_boi

05/31/2020 at 08:32PM

22
#43 - Patrick Weigert / @PatrickWeigert

06/01/2020 at 12:11AM

22
#44 - Gabriel Siqueira / @gabrielhsiq

06/06/2020 at 02:07AM

22
#45 - Georg Kaaserer / @climbim

06/07/2020 at 01:17PM

22
#46 - dirkrob / @dirkrob1

06/19/2020 at 01:21AM

22
#47 - Saurabh / @Saurabh09299

07/22/2020 at 02:09PM

22
#48 - Filipe Brandenburger / @filbranden

08/03/2020 at 04:49PM

23
#49 - floyd / @floyd10086

05/20/2020 at 08:10AM

24
#50 - Seve / @__Seve__

05/18/2020 at 06:35AM

26
#51 - Mitchell Horning / @HorningMitchell

07/03/2020 at 04:51PM

26
#52 - Tiago Nascimento / @tigum27

07/18/2020 at 05:03PM

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

05/22/2020 at 07:05PM

27
#54 - natasha / @CallMeNatchos

06/01/2020 at 12:05AM

27
#55 - Bob / @Bob37174065

06/01/2020 at 12:21PM

27
#56 - Bob Streams / @BobStreams1

06/01/2020 at 06:57PM

27
#57 - Jackie / @Jackie57887507

06/02/2020 at 04:15AM

27
#58 - Alex Lucchesi / @suarigata

06/12/2020 at 03:15PM

27
#59 - JLObject / @powful_panda

07/01/2020 at 07:17PM

27
#60 - Brennan Barker / @BrennanJBarker

07/04/2020 at 12:13PM