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
#181 - Fred Nias / @frednias

12/06/2012 at 01:09PM

12
#182 - Hubba / @HubbaBubbaFett

12/06/2012 at 07:32PM

12
#183 - a24f0600 / @a24f0600

12/19/2012 at 06:12PM

12
#184 - Xinruo Sun / @xiaoruoruo

12/23/2012 at 12:57PM

12
#185 - JonLz / @LzJon

12/26/2012 at 06:49PM

12
#186 - Alec Goebel / @zego5360

01/07/2013 at 02:30AM

12
#187 - Koko / @Koko72525913

01/18/2013 at 03:03PM

12
#188 - Taro Yamada / @t_yamada8karad

01/23/2013 at 01:34PM

12
#189 - Jimmy Mabey / @mabeyj

01/24/2013 at 02:11AM

12
#190 - Yann Moisan / @YannMoisan

01/25/2013 at 03:05PM

12
#191 - Nolic / @cNolic

01/29/2013 at 10:01PM

12
#192 - Panupan S. / @lionpeal

02/01/2013 at 12:34AM

12
#193 - xavier kt / @xav_kt

02/04/2013 at 11:13PM

12
#194 - Adam Bell / @adamgbell

02/13/2013 at 03:44PM

12
#195 - Kai Yuan / @kentyuan

02/21/2013 at 06:27PM

12
#196 - Matt Adelman / @Xavierstein

03/20/2013 at 12:08AM

12
#197 - Trevor Powell / @DoomedBunnies

03/20/2013 at 01:38AM

12
#198 - Sofia Balicka / @so_phifi

03/20/2013 at 12:59PM

12
#199 - Geoff Longman / @metageoff

03/29/2013 at 03:28PM

12
#200 - Martin Keogh / @Martin1Keogh

03/31/2013 at 03:38PM

12
#201 - Tyler / @tylerbindon

03/31/2013 at 04:42PM

12
#202 - Brent Carmer / @brent_carmer

04/08/2013 at 04:42AM

12
#203 - Kuldeep Bora / @kuldeep_bora

04/21/2013 at 09:35AM

12
#204 - Justin / @justinjaffray

04/24/2013 at 12:56PM

12
#205 - Gtranbot / @gtranbot

04/27/2013 at 09:17AM

12
#206 - Petro Тrouq / @zulolosi

05/03/2013 at 06:14AM

12
#207 - iantalks / @iantalks

05/14/2013 at 02:47PM

12
#208 - Kate / @Arohanui

05/16/2013 at 08:30AM

12
#209 - Marco Hinz / @_mhinz_

05/18/2013 at 08:27AM

12
#210 - Frank Dinoff / @FDinoff

05/28/2013 at 02:27AM