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

1474 active golfers, 4450 entries

Leaderboard (lowest score wins):
18
#1261 - Timothy Bryan / @tim_bryan

02/22/2019 at 11:50PM

18
#1262 - Deepstack / @deepstackux

03/15/2019 at 04:20PM

18
#1263 - IHateTweeting999 / @ITweeting999

05/05/2019 at 08:33PM

18
#1264 - Vim Golfer / @VimGolfer6

07/02/2019 at 12:34PM

18
#1265 - Marcus Loo / @MarcusLoo1

07/03/2019 at 03:20PM

18
#1266 - 浚宇 / @Junyu_Wang_cn

08/18/2019 at 06:46AM

18
#1267 - T Gentry / @TGentry36814419

01/22/2020 at 05:31PM

18
#1268 - Kade Pitsch / @kade98528

01/23/2020 at 01:51AM

18
#1269 - Jonah Hlastala / @JonahHlastala

01/23/2020 at 07:55PM

18
#1270 - Matthew Wintersteen / @mattt_w4

01/24/2020 at 02:17AM

18
#1271 - ram / @rambory

01/25/2020 at 09:46PM

18
#1272 - Goldfish™ / @ImAGoldenFish

01/27/2020 at 10:39PM

18
#1273 - Sheep Island Productions / @island_sheep

01/30/2020 at 04:10AM

18
#1274 - Nicus / @NicusTM

01/30/2020 at 07:06PM

18
#1275 - mase / @ThiccMase

01/31/2020 at 08:22PM

18
#1276 - David Hamlin / @dphamlin26

01/31/2020 at 09:25PM

18
#1277 - slawry00 / @slawry00

02/01/2020 at 06:20AM

18
#1278 - Michael / @thscuriousquest

02/29/2020 at 08:23PM

18
#1279 - drGsus / @drGsus

07/29/2020 at 07:44AM

19
#1280 - Anthony Cook / @anthony_m_cook

12/29/2010 at 01:29AM

19
#1281 - lionel young / @lionelyoung

12/29/2010 at 01:37AM

19
#1282 - Colin Jones / @trptcolin

12/29/2010 at 02:17AM

19
#1283 - BrandonMathis / @BrandonMathis

12/29/2010 at 02:25AM

19
#1284 - James Church / @jcchurch

12/29/2010 at 02:52AM

19
#1285 - okay zed / @okayzed

12/29/2010 at 03:40AM

19
#1286 - Ankit Shankar / @thelastnode

12/29/2010 at 06:10AM

19
#1287 - Sebastian Morr / @blinry

12/29/2010 at 09:04AM

19
#1288 - Chris Doble / @chrisdoble

12/29/2010 at 10:07AM

19
#1289 - pcapriotti / @pcapriotti

12/29/2010 at 11:43AM

19
#1290 - kuhout / @kuhout

12/29/2010 at 02:47PM