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 by @andreas_buhr:

Unlock 13 remaining solutions by signing in and submitting your own entry
Created by: @kaddkaka

229 active golfers, 1146 entries

Solutions by @andreas_buhr:
22
#61 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:23PM

22
#>61 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:28PM

27
#>99 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:17PM

28
#>123 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:16PM

29
#>135 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:14PM

30
#>142 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:14PM

31
#>150 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:13PM

34
#>162 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:10PM

38
#>176 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:06PM

39
#>179 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:06PM

44
#>211 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:05PM

51
#>213 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:03PM

58
#>220 - Andreas Buhr / @andreas_buhr

05/24/2020 at 01:01PM