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 1630 remaining solutions by signing in and submitting your own entry
#1631 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

1631 active golfers, 5007 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

12
#700 - Plicatibu / @plicatibu

08/13/2022 at 06:51PM

12
#701 - 임덕윤 / @SnLHUF5ZYJXqI1m

08/21/2022 at 03:11PM

12
#702 - Brandon / @Brandon10678836

08/31/2022 at 11:36AM

12
#703 - Janzen / @__Coos

09/16/2022 at 09:02AM

12
#704 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:46AM

12
#705 - Andrii Soldatenko / @a_soldatenko

10/08/2022 at 04:09PM

12
#706 - Glen Huang / @hihgl

10/22/2022 at 09:35AM

12
#707 - Hans Wurscht / @HansW313

11/08/2022 at 10:33PM

12
#708 - Geek Boy / @Geek79

11/08/2022 at 10:35PM

12
#709 - Zion Park / @zionpark93

01/07/2023 at 03:15AM

12
#710 - Александр Моисеев / @Aleksan43607471

01/21/2023 at 04:37PM

12
#711 - Leonard Bereska / @LeonardBereska

02/20/2023 at 07:04PM

12
#712 - Berkay Berabi / @BerkayBerabi

05/01/2023 at 05:22PM

12
#713 - SmoggyFog / @SmoggyFog

06/02/2023 at 01:25AM

12
#714 - djheidihoe / @djheidihoe1

06/14/2023 at 11:46PM

12
#715 - Dionysus / @user101user

06/15/2023 at 03:24AM

12
#716 - someone / @IKvacenok

06/19/2023 at 12:36PM

12
#717 - vimgolfer220902 / @vimgolfer220902

06/20/2023 at 01:05PM

12
#718 - rayx / @ray-x

12/05/2023 at 10:33AM

12
#719 - evgenii-kokorin / @evgenii-kokorin

02/14/2024 at 10:00AM

12
#720 - Simo Kivistö / @kivissimo

02/14/2024 at 07:09PM