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

1368 active golfers, 4206 entries

Leaderboard (lowest score wins):
22
#1321 - Todd Zimmerman / @zimmermant_uw

02/03/2019 at 03:36PM

22
#1322 - craig.ers / @craigkahle

07/03/2019 at 04:30PM

23
#1323 - Stephen Paul Weber / @singpolyma

12/29/2010 at 02:21AM

23
#1324 - irkenInvader / @irken_Invader

12/29/2010 at 02:45AM

23
#1325 - Aku Kotkavuo / @arkx

12/29/2010 at 02:55AM

23
#1326 - Dominick LoBraico / @pygatea

12/29/2010 at 03:16AM

23
#1327 - vagmi / @vagmi

12/29/2010 at 03:17AM

23
#1328 - Alison Rowland / @arowla

12/29/2010 at 03:34AM

23
#1329 - Eric / @e_harney

12/29/2010 at 03:50AM

23
#1330 - Gordy F / @gordyf

12/29/2010 at 06:52AM

23
#1331 - Brian Buckley / @bbuckley

12/29/2010 at 01:24PM

23
#1332 - Dan Paulus / @dan_paulus

12/29/2010 at 02:45PM

23
#1333 - Gustavo Castro / @gustavocastro

12/29/2010 at 04:48PM

23
#1334 - Carlos Troncoso / @carlostph

12/29/2010 at 10:03PM

23
#1335 - Barthelemy Dagenais / @bartdag

12/30/2010 at 12:51AM

23
#1336 - Babak Pourkazemi / @bpkazemi

04/16/2014 at 02:01AM

24
#1337 - gnuchu / @gnuchu

12/29/2010 at 01:26AM

24
#1338 - eolo999 / @eolo999

12/29/2010 at 01:37AM

24
#1339 - Frank Hui / @frankhui

12/29/2010 at 06:23AM

24
#1340 - Mahesh / @Maheshhhari

08/05/2018 at 02:54PM

25
#1341 - Martin Pugh / @s3krit

12/29/2010 at 01:43AM

25
#1342 - timotheo / @timotheo

12/29/2010 at 05:41AM

25
#1343 - scott / @SetecAstronomy

12/29/2010 at 10:55AM

25
#1344 - ; / @dandwor

02/05/2014 at 01:44PM

25
#1345 - Herr Oppermann / @HerrOppermann

06/15/2014 at 02:10PM

26
#1346 - Nonni / @megamjau

12/29/2010 at 02:47AM

26
#1347 - Michael Lustfield / @Profarius

12/29/2010 at 06:17AM

26
#1348 - Tsatsi Mahase / @tsatsi_mahase

12/15/2014 at 05:59PM

27
#1349 - mracus / @macrsu

12/29/2010 at 07:29AM

27
#1350 - Ajith Antony / @ajithantony

12/29/2010 at 12:57PM