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

0 comments


Created by: @kaddkaka

208 active golfers, 1036 entries

Leaderboard (lowest score wins):
28
#121 - William / @williamwjh

04/11/2022 at 04:27PM

29
#122 - Ali Aslan / @AliAsla95742367

05/22/2020 at 05:33AM

29
#123 - Tzero Ocne / @TzeroOcne

05/26/2020 at 05:12PM

29
#124 - Mateo / @Mateo_BCN

05/29/2020 at 03:06PM

29
#125 - yuval jacoby / @yuval_jacoby

07/20/2020 at 08:39PM

29
#126 - drGsus / @drGsus

07/24/2020 at 06:06PM

29
#127 - Connor / @ronnocthered

08/15/2021 at 03:59AM

29
#128 - AMG / @anmigneer

12/14/2021 at 02:46PM

30
#129 - Andy / @ayy_ess_

05/23/2020 at 10:37PM

30
#130 - LCY / @Chooneh

06/07/2020 at 04:35AM

30
#131 - Muffin / @Muffin91707986

09/05/2020 at 09:22AM

30
#132 - Chris Conte / @chriscconte

10/02/2020 at 05:16PM

30
#133 - Dmitry Antonyuk / @dm_antonyuk

10/16/2020 at 03:28PM

30
#134 - μ˜ν›ˆ / @odjfnrtm

01/02/2021 at 07:23AM

30
#135 - ._. / @Katharsic

04/25/2022 at 03:37PM

31
#136 - 𝓂𝒿𝓇 βˆ‹ ℝ / @real_mjr

05/21/2020 at 09:37AM

31
#137 - Jonathan Striblet / @Telbirts

05/24/2020 at 12:12AM

31
#138 - Alek Mugnozzo / @mugnozzo

05/30/2020 at 07:16AM

31
#139 - mohamed / @melsayed891

06/11/2020 at 11:27PM

31
#140 - Saurav Ray / @sauravpray

08/01/2020 at 07:22PM

31
#141 - ne0-1 / @ne0_01

08/28/2020 at 01:20PM

31
#142 - abhijeet patil / @abhijeetptl5

09/02/2020 at 06:54PM

31
#143 - mevmev / @mevmev8

09/26/2020 at 09:46PM

31
#144 - Zack Freedman / @freedman_zack

11/08/2020 at 07:31PM

32
#145 - Martin Kauppinen / @MartinKauppinen

08/15/2020 at 08:09PM

32
#146 - Leander Hendrikx / @leanderhendrikx

11/22/2020 at 01:05PM

32
#147 - projectDx / @Noritor

12/25/2021 at 09:00AM

33
#148 - Daniel Habib / @danielhvs

07/21/2020 at 09:54PM

34
#149 - Demian Martinez / @demianuco

11/02/2020 at 12:29AM

34
#150 - Kapildev Neupane / @KapildevNeupane

01/01/2021 at 02:46PM