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):
22
#61 - sunny / @pooisonner

05/28/2020 at 08:21AM

22
#62 - Lili Boi / @lili_boi

05/31/2020 at 08:32PM

22
#63 - Patrick Weigert / @PatrickWeigert

06/01/2020 at 12:11AM

22
#64 - Gabriel Siqueira / @gabrielhsiq

06/06/2020 at 02:07AM

22
#65 - Georg Kaaserer / @climbim

06/07/2020 at 01:17PM

22
#66 - dirkrob / @dirkrob1

06/19/2020 at 01:21AM

22
#67 - Saurabh / @Saurabh09299

07/22/2020 at 02:09PM

22
#68 - Filipe Brandenburger / @filbranden

08/03/2020 at 04:49PM

22
#69 - Ivan Kwong / @IvanKwong5

08/09/2020 at 03:14PM

22
#70 - Łukasz Kadłubowski / @LAKadlubowski

08/21/2020 at 04:15AM

22
#71 - Андрей / @appomsk

08/21/2020 at 11:14AM

22
#72 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 12:58AM

22
#73 - Leland Paul Kusmer / @lelandpaul

10/21/2020 at 12:12PM

22
#74 - Free Man / @FreeMan16396552

10/29/2020 at 03:17PM

22
#75 - vimspam / @vimspam

11/09/2020 at 05:27AM

22
#76 - hepebexè / @hepebexe

11/28/2020 at 01:48PM

22
#77 - roudens / @roudens2

12/06/2020 at 09:29AM

22
#78 - Dax / @zacoxi

12/11/2020 at 08:15AM

22
#79 - Jung Yeon Park / @park_jungy

01/01/2021 at 10:17PM

22
#80 - m397 / @m39752809546

06/01/2021 at 06:20AM

22
#81 - Georg Bökman / @BokmanGeorg

07/04/2021 at 09:21AM

22
#82 - Youssef Magdy / @youssef_magdy29

05/01/2022 at 12:57AM

23
#83 - floyd / @floyd10086

05/20/2020 at 08:10AM

24
#84 - Seve / @Seve_py

05/18/2020 at 06:35AM

26
#85 - Mitchell Horning / @HorningMitchell

07/03/2020 at 04:51PM

26
#86 - Tiago Nascimento / @tigum27

07/18/2020 at 05:03PM

26
#87 - quemeraisc / @quemeraisc

11/05/2020 at 04:10PM

26
#88 - nd183 / @nd1832

12/10/2020 at 02:28PM

26
#89 - grsh / @girish_i_am

05/28/2021 at 02:00PM

27
#90 - Jérémy Caldas / @jeremcs

05/22/2020 at 07:05PM