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

0 comments


Created by: @kaddkaka

110 active golfers, 499 entries

Leaderboard (lowest score wins):
27
#61 - Brennan Barker / @BrennanJBarker

07/04/2020 at 12:13PM

27
#62 - Gergely Risko / @errge

07/28/2020 at 10:18PM

27
#63 - Sam Houston / @shouston33

07/29/2020 at 11:14PM

27
#64 - Thiago Becker / @beckert

08/06/2020 at 04:37PM

27
#65 - Martin Bielik / @mabielik

08/06/2020 at 09:48PM

28
#66 - Romeo Valentin / @Seecez

05/18/2020 at 06:40PM

28
#67 - Wayne / @lilwayne15561

05/22/2020 at 02:44AM

28
#68 - Aidan Wilson / @aidanbwilson

05/28/2020 at 02:12PM

28
#69 - betmaster / @betmstr

05/30/2020 at 11:14AM

28
#70 - serici / @serici

07/02/2020 at 04:49PM

28
#71 - Ivo Blöchliger / @aigledesalpes

07/06/2020 at 07:50PM

28
#72 - mindgitrwx / @mindgitrwx

08/06/2020 at 02:25PM

29
#73 - Ali Aslan / @AliAsla95742367

05/22/2020 at 05:33AM

29
#74 - Tzero Ocne / @TzeroOcne

05/26/2020 at 05:12PM

29
#75 - Mateo / @Mateo_BCN

05/29/2020 at 03:06PM

29
#76 - yuval jacoby / @yuval_jacoby

07/20/2020 at 08:39PM

29
#77 - drGsus / @drGsus

07/24/2020 at 06:06PM

30
#78 - Andy / @ayy_ess_

05/23/2020 at 10:37PM

30
#79 - LCY / @Chooneh

06/07/2020 at 04:35AM

31
#80 - 𝓂𝒿𝓇 ∋ ℝ / @real_mjr

05/21/2020 at 09:37AM

31
#81 - Jonathan Striblet / @Telbirts

05/24/2020 at 12:12AM

31
#82 - Alek Mugnozzo / @mugnozzo

05/30/2020 at 07:16AM

31
#83 - mohamed / @melsayed891

06/11/2020 at 11:27PM

31
#84 - Saurav Ray / @sauravpray

08/01/2020 at 07:22PM

33
#85 - Daniel Habib / @danielhvs

07/21/2020 at 09:54PM

34
#86 - vito / @vito49999722

08/10/2020 at 08:04AM

35
#87 - Roger Stoltz / @rogsto1

05/17/2020 at 09:06PM

35
#88 - dl1991 / @dl19913

05/29/2020 at 05:26AM

37
#89 - Rishabh Dwivedi / @Rishabh45312910

07/03/2020 at 09:37PM

37
#90 - Norman Liu / @normanwliu

07/25/2020 at 11:04PM