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

0 comments


Created by: @kaddkaka

175 active golfers, 866 entries

Leaderboard (lowest score wins):
31
#121 - Jonathan Striblet / @Telbirts

05/24/2020 at 12:12AM

31
#122 - Alek Mugnozzo / @mugnozzo

05/30/2020 at 07:16AM

31
#123 - mohamed / @melsayed891

06/11/2020 at 11:27PM

31
#124 - Saurav Ray / @sauravpray

08/01/2020 at 07:22PM

31
#125 - ne0-1 / @ne0_01

08/28/2020 at 01:20PM

31
#126 - abhijeet patil / @abhijeetptl5

09/02/2020 at 06:54PM

31
#127 - mevmev / @mevmev8

09/26/2020 at 09:46PM

31
#128 - Zack Freedman / @freedman_zack

11/08/2020 at 07:31PM

32
#129 - Martin Kauppinen / @MartinKauppinen

08/15/2020 at 08:09PM

32
#130 - Leander Hendrikx / @leanderhendrikx

11/22/2020 at 01:05PM

33
#131 - Daniel Habib / @danielhvs

07/21/2020 at 09:54PM

34
#132 - Demian Martinez / @demianuco

11/02/2020 at 12:29AM

34
#133 - Kapildev Neupane / @KapildevNeupane

01/01/2021 at 02:46PM

35
#134 - Roger Stoltz / @rogsto1

05/17/2020 at 09:06PM

35
#135 - dl1991 / @dl19913

05/29/2020 at 05:26AM

35
#136 - Robert Verst / @r_verst

09/02/2020 at 11:18AM

35
#137 - Alice / @Alice10204425

09/30/2020 at 06:15AM

35
#138 - John Doe / @JohnDoe75830353

12/22/2020 at 02:20PM

36
#139 - MrRubiksSC / @RubiksSc

11/27/2020 at 04:01AM

37
#140 - Rishabh Dwivedi / @Rishabh45312910

07/03/2020 at 09:37PM

37
#141 - Norman Liu / @normanwliu

07/25/2020 at 11:04PM

37
#142 - GenericHardwareGamer / @GnrikHrdwrGamer

08/05/2020 at 10:48AM

38
#143 - vimgolfer98746521 / @vimgolfer987461

09/12/2020 at 04:35PM

39
#144 - Kurtis D. Miller / @phdkurt

07/26/2020 at 07:02PM

40
#145 - pady. 🇪🇺 / @hundertzwoelf_

05/20/2020 at 04:21PM

40
#146 - Amit Kumar / @amit_locham

06/01/2020 at 03:59PM

40
#147 - majo senf / @majo_senf

06/16/2020 at 09:31AM

40
#148 - Edgar Domingues / @edgar_domingues

07/09/2020 at 08:54AM

40
#149 - knub / @LauraToric

08/01/2020 at 09:43AM

40
#150 - Franz Kirchhoff / @kirchhoff_f

10/11/2020 at 05:14PM