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

0 comments


Created by: @kaddkaka

184 active golfers, 898 entries

Leaderboard (lowest score wins):
39
#151 - alfyn / @xacosh

06/11/2021 at 04:17AM

40
#152 - pady. 🇪🇺 / @hundertzwoelf_

05/20/2020 at 04:21PM

40
#153 - Amit Kumar / @amit_locham

06/01/2020 at 03:59PM

40
#154 - majo senf / @majo_senf

06/16/2020 at 09:31AM

40
#155 - Edgar Domingues / @edgar_domingues

07/09/2020 at 08:54AM

40
#156 - knub / @LauraToric

08/01/2020 at 09:43AM

40
#157 - Franz Kirchhoff / @kirchhoff_f

10/11/2020 at 05:14PM

40
#158 - Michael / @Michael62785035

05/30/2021 at 03:12PM

41
#159 - yanisdebusschere@gmail.com / @db_yanis

05/26/2020 at 06:47PM

41
#160 - Yannick / @Yannick88147038

06/01/2020 at 09:06AM

41
#161 - gardalion / @gardalion

06/03/2020 at 10:51PM

41
#162 - Martin Landsem / @landsematwork

06/15/2020 at 10:21AM

41
#163 - Azeddine Hamdaoui / @Azeddine_Hmd

09/05/2020 at 08:48PM

41
#164 - Christ / @Christ46234422

09/05/2020 at 11:54PM

41
#165 - Muradil / @Muradil71938308

10/21/2020 at 08:56PM

41
#166 - Ihor / @Ihor96382508

11/30/2020 at 11:09AM

41
#167 - Neverlandrunner / @neverlandrunner

12/06/2020 at 07:13AM

42
#168 - Vallaa123 / @vallaa123

05/25/2020 at 06:59AM

42
#169 - Sebastian W. / @Sebasti91439242

09/01/2020 at 07:33PM

43
#170 - David Cherednik / @david_cherednik

05/22/2020 at 06:49PM

43
#171 - Kieran / @Kieran39992130

06/02/2020 at 05:09AM

43
#172 - jackmark / @jackmar14540583

07/10/2020 at 10:56AM

43
#173 - zapakh / @zapakh

01/22/2021 at 12:06AM

44
#174 - Srinath / @SrinathNair_

05/24/2020 at 06:09PM

50
#175 - fff / @fff51460170

01/13/2021 at 03:35AM

51
#176 - Richard Lowe / @b0ggyb33

06/30/2020 at 08:17AM

54
#177 - Yondonjamts / @yondonjamts_g

11/15/2020 at 01:10PM

54
#178 - Doemae / @Doemae02

05/25/2021 at 03:23PM

55
#179 - gino / @imGinoW

05/21/2020 at 03:41PM

55
#180 - Yinghan Tan / @YinghanTan

05/30/2020 at 01:17AM