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 1360 remaining solutions by signing in and submitting your own entry
#1361 Richard Kaufman / @sparragus - Score: 96 - 12/29/10 @ 14:56
:/<BS>%/<Left><Left><Right>s<Right>'aa'<Left>a<Right>/<Left><Left>x<Left><Right><Right><BS><BS><Left><Left><Left><BS><Right><Right><Right><Right><Right>xaaax/g<CR>:wq<CR>

0 comments


Created by: @wolever

1361 active golfers, 4187 entries

Leaderboard (lowest score wins):
21
#1291 - michael caviness / @michaelmichael

12/29/2010 at 09:07PM

21
#1292 - ryanmusicman / @ryanmusicman

12/29/2010 at 10:26PM

21
#1293 - Vishal Bhavsar / @vbhavsar

12/30/2010 at 12:29AM

21
#1294 - Brent Lintner / @brentlintner

12/30/2010 at 12:29AM

21
#1295 - Radu Bogdan Croitoru / @dotx

02/21/2014 at 10:53PM

21
#1296 - Rounak Jain / @r0unak

03/04/2014 at 11:30AM

21
#1297 - ЕвгенийВ / @imater

10/27/2014 at 04:13PM

21
#1298 - David Butler / @dbuts11

06/08/2018 at 02:42AM

21
#1299 - R / @rvan3210

08/11/2019 at 12:08AM

22
#1300 - Ronuk Raval / @rraval

12/29/2010 at 02:18AM

22
#1301 - Kiran Ryali / @kiranryali

12/29/2010 at 03:51AM

22
#1302 - Bennett A. Joseph / @bennettajoseph

12/29/2010 at 06:45AM

22
#1303 - ivarv / @ivarv

12/29/2010 at 07:46AM

22
#1304 - Rohit Nair / @rohitnair

12/29/2010 at 08:44AM

22
#1305 - Jan B. / @bracki

12/29/2010 at 08:53AM

22
#1306 - 東 / @lldong

12/29/2010 at 10:57AM

22
#1307 - Simon Walker / @srwalker101

12/29/2010 at 11:37AM

22
#1308 - Fer Enaf / @0x00C0FFEE

12/29/2010 at 12:44PM

22
#1309 - smokey42 / @smokey42

12/29/2010 at 02:16PM

22
#1310 - David Anguita / @danguita

12/30/2010 at 09:12AM

22
#1311 - arumat / @ryochack

04/24/2011 at 07:41AM

22
#1312 - sorami / @boredoms

04/30/2011 at 09:43PM

22
#1313 - olivier lemoigne / @olivierlemoigne

05/04/2018 at 12:42PM

22
#1314 - Todd Zimmerman / @zimmermant_uw

02/03/2019 at 03:36PM

22
#1315 - craig.ers / @craigkahle

07/03/2019 at 04:30PM

23
#1316 - Stephen Paul Weber / @singpolyma

12/29/2010 at 02:21AM

23
#1317 - irkenInvader / @irken_Invader

12/29/2010 at 02:45AM

23
#1318 - Aku Kotkavuo / @arkx

12/29/2010 at 02:55AM

23
#1319 - Dominick LoBraico / @pygatea

12/29/2010 at 03:16AM

23
#1320 - vagmi / @vagmi

12/29/2010 at 03:17AM