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

1630 active golfers, 5004 entries

Leaderboard (lowest score wins):
12
#361 - Ivan Brennan / @ivanbrennan

12/06/2014 at 11:45PM

12
#362 - Daniel Wang / @danwang

12/11/2014 at 12:07AM

12
#363 - Wade / @vvandy

12/16/2014 at 04:43AM

12
#364 - Edward Brown / @ChazKato

12/16/2014 at 08:13PM

12
#365 - Matt / @mcr05

12/30/2014 at 11:03PM

12
#366 - Jake Eskel / @JakeEskel

12/31/2014 at 05:15AM

12
#367 - Zull Full / @Zullfull

01/09/2015 at 06:37PM

12
#368 - Oli / @o_lalonde

01/11/2015 at 12:40PM

12
#369 - kimber gonzalez / @kimberlycreates

01/13/2015 at 04:05PM

12
#370 - Charles Wu / @Congeec

01/14/2015 at 03:08AM

12
#371 - Sampriti Panda / @sampritipanda

01/15/2015 at 06:51AM

12
#372 - Ilari Mäkelä / @ilarimkel

01/21/2015 at 05:20PM

12
#373 - Steven Lu / @stevenlu443

02/07/2015 at 05:29AM

12
#374 - Dmitry Zudochkin / @zudochkin

02/19/2015 at 05:47PM

12
#375 - Michael Giuffrida / @mgiuffrida

02/24/2015 at 09:01AM

12
#376 - Dorian Scheidt / @DorianListens

02/25/2015 at 05:25AM

12
#377 - xieyh11 / @xieyh11

02/26/2015 at 08:38AM

12
#378 - @sndsgns / @sndsgns

02/27/2015 at 01:21AM

12
#379 - John Smith / @intanalyst1

02/28/2015 at 01:57PM

12
#380 - Robin Moussu / @robin_moussu

03/30/2015 at 05:16PM

12
#381 - Alexander Kazakov / @volandkot

03/31/2015 at 08:15AM

12
#382 - pftb12345 / @pftb12345

04/02/2015 at 05:18AM

12
#383 - E Both / @enboth

04/15/2015 at 09:53PM

12
#384 - Tom van der Lee / @TomVdLee

04/17/2015 at 12:14PM

12
#385 - Sigurður Ægir Jónsso / @siggiae

05/11/2015 at 08:15AM

12
#386 - Elizabeth / @sprinkles418

05/28/2015 at 01:27AM

12
#387 - Marty Boren / @beanmaximalist

06/02/2015 at 05:13AM

12
#388 - David Nguyen / @nguydavi

06/05/2015 at 07:28PM

12
#389 - Nicholas McHenry / @n_mchenry

06/14/2015 at 04:22PM

12
#390 - Mikołaj Morzy / @MikolajMorzy

06/16/2015 at 08:50AM