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):
12
#631 - Johannes Riecken / @rubystallion

01/15/2020 at 06:49PM

12
#632 - li / @li94938987

01/24/2020 at 04:34PM

12
#633 - Brady Cornett / @BradyCornett

01/24/2020 at 08:23PM

12
#634 - Jason Neylon / @jasonneylon

01/28/2020 at 07:49PM

12
#635 - Sushrut Shirole / @sushrutshirole

01/31/2020 at 02:33AM

12
#636 - Patrick Bryan / @gadget086

02/26/2020 at 01:56AM

12
#637 - countime / @countime1

03/12/2020 at 10:44AM

12
#638 - Magnetic Spark / @Magnetic_Spark

03/14/2020 at 02:05AM

12
#639 - floyd / @floyd10086

03/20/2020 at 09:35AM

12
#640 - Quark / @PuzzleQuark

03/22/2020 at 06:21PM

12
#641 - Niklas Ydebäck / @Ydebaeck

03/22/2020 at 11:08PM

12
#642 - etherflow / @etherfl0w

03/30/2020 at 07:31PM

12
#643 - Nick Lee / @TooManyNickLees

04/05/2020 at 09:32PM

12
#644 - Moatvald / @moatvald

04/28/2020 at 01:42PM

12
#645 - Robin Abrahamsson / @rqAbrahamsson

04/30/2020 at 03:01PM

12
#646 - Arthur Goodman / @ArthurGoodman3

05/07/2020 at 09:44PM

12
#647 - Quentin Leroy / @qnleroy

05/08/2020 at 06:50AM

12
#648 - Kevin Keefe / @KevinKeefe5

05/15/2020 at 05:20PM

12
#649 - 于吉星 / @fishermryn

05/28/2020 at 08:52AM

12
#650 - RockerZZY / @rocker_zzy

05/28/2020 at 01:02PM

12
#651 - Finlay l͓̽o͓̽c͓̽k͓̽e͓̽d͓̽d͓̽o͓̽w͓̽n͓̽ McAfee / @finsqm

06/09/2020 at 06:50PM

12
#652 - Ming Dai / @MingDai2

06/30/2020 at 06:29PM

12
#653 - Jan Sturm / @JanSturm77

07/15/2020 at 05:23PM

12
#654 - mindgitrwx / @mindgitrwx

09/03/2020 at 12:45AM

12
#655 - abhijeet patil / @abhijeetptl5

09/03/2020 at 04:28AM

12
#656 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 07:26PM

12
#657 - mevmev / @mevmev8

10/08/2020 at 03:49PM

12
#658 - lamtt77 / @lamtt77

10/12/2020 at 12:17AM

12
#659 - Henry MATHEISEN / @hmatheisen

10/22/2020 at 01:41PM

12
#660 - chocolate / @chocola81394123

11/28/2020 at 05:19PM