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):
17
#1291 - Patrick Pitoscia / @Patrick03960431

08/04/2014 at 03:59AM

17
#1292 - durcheinandr / @durcheinandr

01/03/2015 at 06:07PM

17
#1293 - Kristijan Husak / @kristijan_husak

02/02/2015 at 09:45PM

17
#1294 - vimgolf / @neovimp

03/04/2015 at 05:21PM

17
#1295 - Emmanuel Lund / @elund_az

09/18/2015 at 09:52PM

17
#1296 - Markus Bohl / @bohl_markus

02/26/2016 at 02:20PM

17
#1297 - Kento Kaneko / @kentokaneko

06/15/2016 at 03:55PM

17
#1298 - asno / @AsnoGordo

08/12/2017 at 07:02PM

17
#1299 - Banner B. Schafer / @BannerBSchafer

07/29/2018 at 11:12PM

17
#1300 - Thiago Preischadt / @TPreischadt

07/11/2019 at 01:23AM

17
#1301 - Wes / @Wes36828283

01/28/2020 at 10:19PM

17
#1302 - @abimelechbeutelbilch@fulda.social 𝕏 / @FHashitoku

05/08/2020 at 03:01PM

17
#1303 - Kaustubh Murumkar / @k_austub_h

09/07/2020 at 07:04AM

17
#1304 - atsuhiko / @atsuhik40022188

01/11/2021 at 02:30PM

17
#1305 - akashcapitalnumbers / @akashcapitalnumbers

12/27/2024 at 12:17PM

18
#1306 - Joe McCall / @joem86

12/29/2010 at 03:38AM

18
#1307 - Chris K. Engel / @m0rb

12/29/2010 at 04:37AM

18
#1308 - Scott Blomquist / @sblom

12/29/2010 at 07:18AM

18
#1309 - Ryan Fitzgerald / @rwfitzge

12/29/2010 at 09:27AM

18
#1310 - Indrek Juhkam / @indrekj

12/29/2010 at 12:54PM

18
#1311 - Peter Granger / @peter_granger

12/29/2010 at 02:50PM

18
#1312 - Nicolas Ledez / @nledez

12/29/2010 at 08:21PM

18
#1313 - Mike Cooper / @mythmon

12/29/2010 at 11:29PM

18
#1314 - alexscott / @4l3xsc0tt

12/30/2010 at 02:05AM

18
#1315 - Sam Nardoni / @samnardoni

12/31/2010 at 12:37AM

18
#1316 - drio / @drio

01/01/2011 at 01:01AM

18
#1317 - Helder Inacio / @inaciohj

01/07/2011 at 06:17AM

18
#1318 - fuck you / @jerkassholeface

01/15/2011 at 12:52AM

18
#1319 - SirVer / @SirVerII

01/22/2011 at 03:01PM

18
#1320 - Gord Tanner / @gordtanner

02/01/2011 at 03:36AM