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 @lamtt77:

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

172 active golfers, 843 entries

Solutions by @lamtt77:
21
#29 - lamtt77 / @lamtt77

10/08/2020 at 11:50PM

22
#>63 - lamtt77 / @lamtt77

10/08/2020 at 11:21PM

26
#>74 - lamtt77 / @lamtt77

10/08/2020 at 11:16PM

27
#>92 - lamtt77 / @lamtt77

10/08/2020 at 01:42PM

28
#>106 - lamtt77 / @lamtt77

10/08/2020 at 01:31PM

35
#>135 - lamtt77 / @lamtt77

10/08/2020 at 01:25PM

37
#>140 - lamtt77 / @lamtt77

10/08/2020 at 01:19PM

38
#>141 - lamtt77 / @lamtt77

10/08/2020 at 01:15PM

40
#>147 - lamtt77 / @lamtt77

10/08/2020 at 01:12PM

41
#>154 - lamtt77 / @lamtt77

10/08/2020 at 01:09PM