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):
18
#1411 - mase / @ThiccMase

01/31/2020 at 08:22PM

18
#1412 - David Hamlin / @dphamlin26

01/31/2020 at 09:25PM

18
#1413 - slawry00 / @slawry00

02/01/2020 at 06:20AM

18
#1414 - Michael / @thscuriousquest

02/29/2020 at 08:23PM

18
#1415 - drGsus / @drGsus

07/29/2020 at 07:44AM

18
#1416 - dione bigode / @dionebigode

11/06/2021 at 04:37PM

18
#1417 - Gerard Keane / @gerardkeane

05/14/2024 at 11:28AM

18
#1418 - KhaAdam / @KhaAdam

08/08/2024 at 03:02PM

19
#1419 - Anthony Cook / @anthony_m_cook

12/29/2010 at 01:29AM

19
#1420 - lionel young / @lionelyoung

12/29/2010 at 01:37AM

19
#1421 - Colin Jones / @trptcolin

12/29/2010 at 02:17AM

19
#1422 - BrandonMathis / @BrandonMathis

12/29/2010 at 02:25AM

19
#1423 - James Church / @jcchurch

12/29/2010 at 02:52AM

19
#1424 - okay zed / @okayzed

12/29/2010 at 03:40AM

19
#1425 - Ankit Shankar / @thelastnode

12/29/2010 at 06:10AM

19
#1426 - Sebastian Morr / @blinry

12/29/2010 at 09:04AM

19
#1427 - Chris Doble / @chrisdoble

12/29/2010 at 10:07AM

19
#1428 - pcapriotti / @pcapriotti

12/29/2010 at 11:43AM

19
#1429 - kuhout / @kuhout

12/29/2010 at 02:47PM

19
#1430 - Dave V. / @dave_v

12/29/2010 at 02:47PM

19
#1431 - Daniel Hahler / @blueyed

12/29/2010 at 08:26PM

19
#1432 - Adam / @arboooz

12/29/2010 at 09:33PM

19
#1433 - TchiKong / @tchikong

01/23/2011 at 11:26AM

19
#1434 - Nick Jones / @nickj89

04/10/2011 at 12:46PM

19
#1435 - Fat troll / @fat_troll

03/29/2014 at 08:39AM

19
#1436 - Charles Neill / @ccneill

05/01/2014 at 01:56AM

19
#1437 - Jacob Rosenblatt / @JKRosenblatt

06/15/2014 at 02:39PM

19
#1438 - Daniel Low / @deniallow

08/07/2014 at 10:21PM

19
#1439 - Rathrio / @Rathrio

09/02/2014 at 12:33PM

19
#1440 - a b / @c00_a

01/19/2015 at 12:13PM