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 4d1a8bf2b8cb3409320002c4

Search and Replace 0

Replace every instance of 'aaa' with 'xaaax'.

Start file
aaa
aab
abb
bbb
aaa
aab
abb
bbb
aaa
aab
abb
bbb
aaa
aab
abb
bbb
aaa
aab
abb
bbb
End file
xaaax
aab
abb
bbb
xaaax
aab
abb
bbb
xaaax
aab
abb
bbb
xaaax
aab
abb
bbb
xaaax
aab
abb
bbb

View Diff

1c1
< aaa
---
> xaaax
5c5
< aaa
---
> xaaax
9c9
< aaa
---
> xaaax
13c13
< aaa
---
> xaaax
17c17
< aaa
---
> xaaax

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 1548 remaining solutions by signing in and submitting your own entry
#1549 Heissen López / @heilop - Score: 140 - 06/15/20 @ 21:30
<Esc>%i<Esc>%<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Esc>%/aaa/xaaax/g<CR><Up><Down><Esc>%/aaa/Replace<CR><CR><Esc>:%/aaa/xax<BS>aax/g<CR><Esc>:%s/aaa/xaaax/g<CR><Esc>:wq!<CR>

0 comments


Created by: @wolever

1549 active golfers, 4676 entries

Leaderboard (lowest score wins):
14
#991 - Березницкий Вадим / @vad1mster

07/09/2019 at 11:35AM

14
#992 - Ivo Blöchliger / @aigledesalpes

08/04/2019 at 08:34PM

14
#993 - お-せ-よ- / @OhSayYo

08/26/2019 at 10:43PM

14
#994 - Aioriya / @AioriyaDonk

08/28/2019 at 03:30AM

14
#995 - ゆに / @lededex

08/28/2019 at 07:04PM

14
#996 - Hans Lidiki / @HLidiki

09/07/2019 at 06:04PM

14
#997 - Ariel Miculas / @ArielMiculas

09/19/2019 at 03:24PM

14
#998 - GrimmT / @GrimmT10

11/02/2019 at 09:17AM

14
#999 - Tokos Apos / @AposTokosapos

11/04/2019 at 12:26PM

14
#1000 - Timo Böhm / @TimoBohm

11/26/2019 at 09:31AM

14
#1001 - Patrick / @Pattywack18

01/05/2020 at 09:23PM

14
#1002 - JimmyGymglish / @JGymglish

01/15/2020 at 11:08AM

14
#1003 - Ben Guericke / @ben_guericke

01/22/2020 at 05:26PM

14
#1004 - əarth simulator / @eidoloncity

02/06/2020 at 10:30PM

14
#1005 - Sanchez / @r0756108

03/11/2020 at 10:35AM

14
#1006 - 薛浩滎 / @iTPChbTeI4ZW9s3

03/17/2020 at 10:36PM

14
#1007 - caffeineism / @caffeineism

04/15/2020 at 08:39PM

14
#1008 - David Bragmark / @DBragmark

04/29/2020 at 02:46PM

14
#1009 - dule2607 / @dule26071

05/03/2020 at 08:02AM

14
#1010 - Jason / @roosjason

05/05/2020 at 08:16AM

14
#1011 - Sarayut Lawilai / @imkopkap

05/13/2020 at 09:17AM

14
#1012 - jackmark / @jackmar14540583

07/11/2020 at 05:26AM

14
#1013 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 06:26PM

14
#1014 - Gytis Vinclovas / @GytisVinclovas

10/16/2020 at 01:52PM

14
#1015 - Ramūnas Musteikis / @RamnasMusteiki1

10/16/2020 at 01:56PM

14
#1016 - roudens / @roudens2

12/16/2020 at 05:10AM

14
#1017 - Ethan Rietz / @EthanRietz

06/29/2021 at 01:54PM

14
#1018 - rappenstein2 / @rappenstein2

01/21/2022 at 04:42PM

14
#1019 - yancy / @yancy_dong

05/02/2022 at 03:14PM

14
#1020 - Tyler Carson / @tylerccarson

05/05/2022 at 03:45PM