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

1472 active golfers, 4446 entries

Leaderboard (lowest score wins):
20
#1351 - Mike Wittie / @mike_wittie

01/27/2020 at 07:18PM

20
#1352 - Hunter McGee / @Huntzman56

01/29/2020 at 05:37PM

20
#1353 - Olivia Firth / @OliviaFirth4

01/29/2020 at 07:40PM

20
#1354 - Iuno Jones / @IunoJones

01/30/2020 at 09:48PM

20
#1355 - Conner / @Connconn7

01/31/2020 at 08:57PM

20
#1356 - Andrew Dixon / @acdixon91

02/01/2020 at 03:53AM

20
#1357 - Sherbert Jackson / @JacksonSherbert

02/01/2020 at 06:40AM

21
#1358 - buck mild / @andyleclair

12/29/2010 at 01:46AM

21
#1359 - Alfredo Deza / @alfredodeza

12/29/2010 at 02:05AM

21
#1360 - Tyler Wymer / @twymer

12/29/2010 at 02:33AM

21
#1361 - Cleve Pasarell / @clevepasarell

12/29/2010 at 03:04AM

21
#1362 - Al / @broohaha

12/29/2010 at 04:25AM

21
#1363 - Mint Shows / @mintshows

12/29/2010 at 05:07AM

21
#1364 - Andrew Myers / @drewrm

12/29/2010 at 05:35AM

21
#1365 - Kenny Parnell / @kennyp

12/29/2010 at 07:15AM

21
#1366 - Dhruva Sagar / @dhruvasagar

12/29/2010 at 07:17AM

21
#1367 - thisbetom / @thisbetom

12/29/2010 at 07:23AM

21
#1368 - Fraxtil / @Fraxtil

12/29/2010 at 07:56AM

21
#1369 - Porkchop Diet / @porkchopdiet

12/29/2010 at 09:26AM

21
#1370 - marklu / @marklu

12/29/2010 at 09:48AM

21
#1371 - theshadowhost / @theshadowhost

12/29/2010 at 01:21PM

21
#1372 - Lasse Højgaard / @lhojgaard

12/29/2010 at 01:28PM

21
#1373 - Fredrik / @S_edrik

12/29/2010 at 02:23PM

21
#1374 - Chris Cooke / @chriscooke

12/29/2010 at 03:19PM

21
#1375 - MrITR / @MrITR

12/29/2010 at 07:09PM

21
#1376 - Andrew McDonough / @andrewmcdonough

12/29/2010 at 07:22PM

21
#1377 - Chris Brown / @xoebus

12/29/2010 at 07:59PM

21
#1378 - michael caviness / @michaelmichael

12/29/2010 at 09:07PM

21
#1379 - ryanmusicman / @ryanmusicman

12/29/2010 at 10:26PM

21
#1380 - Vishal Bhavsar / @vbhavsar

12/30/2010 at 12:29AM