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
#691 - Levi Wheeler / @LeviWhe68726437

05/23/2022 at 09:16PM

12
#692 - russellzhaomao / @russellzhaomao

05/25/2022 at 03:12AM

12
#693 - josh / @_zvjos

06/19/2022 at 11:59AM

12
#694 - WbrL17 / @WbrL17

06/23/2022 at 07:54PM

12
#695 - Alex / @AlexanderHeatl2

07/05/2022 at 05:12PM

12
#696 - Stanisław Ostrowski / @StanisawOstrow4

07/08/2022 at 06:56PM

12
#697 - Robert Newey / @wiseassbogan

07/09/2022 at 06:02AM

12
#698 - Qing Liu / @poeminlash

07/19/2022 at 08:38PM

12
#699 - loupiot.veloce / @LoupiotVeloce

07/22/2022 at 09:21AM

13
#700 - Soliman Sylvain / @sylvain_soliman

12/29/2010 at 12:54PM

13
#701 - Mariano Guerra / @marianoguerra

12/29/2010 at 01:22PM

13
#702 - arungn / @arungn

12/29/2010 at 07:02PM

13
#703 - Timothy DeBaillie / @timdebaillie

12/29/2010 at 09:33PM

13
#704 - Aurélien Delahaye / @alkove

01/02/2011 at 01:26AM

13
#705 - enzbang / @enzbang

01/08/2011 at 09:15PM

13
#706 - h_east (トロッコ6個) / @h_east

01/15/2011 at 05:20PM

13
#707 - Strahinja Popovic / @stralep

01/16/2011 at 10:11AM

13
#708 - Kristof Jozsa / @kjozsa

01/19/2011 at 02:42PM

13
#709 - David Pflug / @dpflug

02/04/2011 at 06:48PM

13
#710 - Mark Scholtz / @markscholtz

02/07/2011 at 08:43PM

13
#711 - mightyfoo / @mightyfoo

05/25/2011 at 03:51PM

13
#712 - Øystein Walle / @oysteinwalle

07/06/2011 at 11:47PM

13
#713 - Jim Infield / @jinfield

07/20/2011 at 04:08AM

13
#714 - Gary Rennie / @TheGazler

08/03/2011 at 03:43PM

13
#715 - Christopher Erin / @MCNormalMode

09/16/2011 at 04:27AM

13
#716 - Martin Carlsson / @martincarlsson_

09/26/2011 at 09:19PM

13
#717 - vimja / @vimja666

11/02/2011 at 11:43PM

13
#718 - Jonathan Payne / @JonathanPayne4

11/03/2011 at 06:38PM

13
#719 - cheerfulstoic / @cheerfulstoic

12/21/2011 at 08:48PM

13
#720 - Burkhard Zimmermann / @BurkZimm

12/26/2011 at 04:03PM