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):
30
#121 - μ˜ν›ˆ / @odjfnrtm

01/02/2021 at 07:23AM

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

05/21/2020 at 09:37AM

31
#123 - Jonathan Striblet / @Telbirts

05/24/2020 at 12:12AM

31
#124 - Alek Mugnozzo / @mugnozzo

05/30/2020 at 07:16AM

31
#125 - mohamed / @melsayed891

06/11/2020 at 11:27PM

31
#126 - Saurav Ray / @sauravpray

08/01/2020 at 07:22PM

31
#127 - ne0-1 / @ne0_01

08/28/2020 at 01:20PM

31
#128 - abhijeet patil / @abhijeetptl5

09/02/2020 at 06:54PM

31
#129 - mevmev / @mevmev8

09/26/2020 at 09:46PM

31
#130 - Zack Freedman / @freedman_zack

11/08/2020 at 07:31PM

32
#131 - Martin Kauppinen / @MartinKauppinen

08/15/2020 at 08:09PM

32
#132 - Leander Hendrikx / @leanderhendrikx

11/22/2020 at 01:05PM

33
#133 - Daniel Habib / @danielhvs

07/21/2020 at 09:54PM

34
#134 - Demian Martinez / @demianuco

11/02/2020 at 12:29AM

34
#135 - Kapildev Neupane / @KapildevNeupane

01/01/2021 at 02:46PM

35
#136 - Roger Stoltz / @rogsto1

05/17/2020 at 09:06PM

35
#137 - dl1991 / @dl19913

05/29/2020 at 05:26AM

35
#138 - Robert Verst / @r_verst

09/02/2020 at 11:18AM

35
#139 - Alice / @Alice10204425

09/30/2020 at 06:15AM

35
#140 - John Doe / @JohnDoe75830353

12/22/2020 at 02:20PM

35
#141 - :wq / @write_quit_22

05/20/2021 at 11:07AM

36
#142 - MrRubiksSC / @RubiksSc

11/27/2020 at 04:01AM

37
#143 - Rishabh Dwivedi / @Rishabh45312910

07/03/2020 at 09:37PM

37
#144 - Norman Liu / @normanwliu

07/25/2020 at 11:04PM

37
#145 - GenericHardwareGamer / @GnrikHrdwrGamer

08/05/2020 at 10:48AM

38
#146 - vimgolfer98746521 / @vimgolfer987461

09/12/2020 at 04:35PM

38
#147 - OtterPy / @OtterPy

01/27/2021 at 03:36PM

38
#148 - Scott Atkins / @scottrick49

06/02/2021 at 07:00PM

39
#149 - Kurtis D. Miller / @phdkurt

07/26/2020 at 07:02PM

39
#150 - Ibrahim Abou Elenein / @abou_eleyes

05/27/2021 at 10:23AM