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):
22
#61 - Filipe Brandenburger / @filbranden

08/03/2020 at 04:49PM

22
#62 - Ivan Kwong / @IvanKwong5

08/09/2020 at 03:14PM

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

08/21/2020 at 04:15AM

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

08/21/2020 at 11:14AM

22
#65 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 12:58AM

22
#66 - Leland Paul Kusmer / @lelandpaul

10/21/2020 at 12:12PM

22
#67 - Free Man / @FreeMan16396552

10/29/2020 at 03:17PM

22
#68 - vimspam / @vimspam

11/09/2020 at 05:27AM

22
#69 - hepebexè / @hepebexe

11/28/2020 at 01:48PM

22
#70 - roudens / @roudens2

12/06/2020 at 09:29AM

22
#71 - Dax / @zacoxi

12/11/2020 at 08:15AM

22
#72 - Jung Yeon Park / @park_jungy

01/01/2021 at 10:17PM

22
#73 - m397 / @m39752809546

06/01/2021 at 06:20AM

23
#74 - floyd / @floyd10086

05/20/2020 at 08:10AM

24
#75 - Seve / @Seve_py

05/18/2020 at 06:35AM

26
#76 - Mitchell Horning / @HorningMitchell

07/03/2020 at 04:51PM

26
#77 - Tiago Nascimento / @tigum27

07/18/2020 at 05:03PM

26
#78 - quemeraisc / @quemeraisc

11/05/2020 at 04:10PM

26
#79 - nd183 / @nd1832

12/10/2020 at 02:28PM

26
#80 - grsh / @girish_i_am

05/28/2021 at 02:00PM

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

05/22/2020 at 07:05PM

27
#82 - natasha / @CallMeNatchos

06/01/2020 at 12:05AM

27
#83 - Bob / @Bob37174065

06/01/2020 at 12:21PM

27
#84 - Bob Streams / @BobStreams1

06/01/2020 at 06:57PM

27
#85 - Jackie / @Jackie57887507

06/02/2020 at 04:15AM

27
#86 - Alex Lucchesi / @suarigata

06/12/2020 at 03:15PM

27
#87 - JLObject / @powful_panda

07/01/2020 at 07:17PM

27
#88 - Brennan Barker / @BrennanJBarker

07/04/2020 at 12:13PM

27
#89 - Gergely Risko / @errge

07/28/2020 at 10:18PM

27
#90 - Sam Houston / @shouston33

07/29/2020 at 11:14PM