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
#541 - steve N ӾlvЮ / @xlvio

11/15/2018 at 07:21PM

12
#542 - name / @name65894813

11/18/2018 at 08:50PM

12
#543 - faisal / @faisalhackshah

11/25/2018 at 03:42AM

12
#544 - timonegk / @timonegk

11/25/2018 at 07:55PM

12
#545 - Mihai / @mihaicristiant

12/04/2018 at 09:20AM

12
#546 - Jordan / @RiotChomey

12/19/2018 at 01:18AM

12
#547 - Alex Mitchell / @alexthemitchell

12/19/2018 at 08:55PM

12
#548 - guxbug / @guxbug1

12/21/2018 at 09:00AM

12
#549 - Bart Kleijngeld / @BartKleijngeld

12/24/2018 at 08:51PM

12
#550 - TimMcGuire / @mcguire

12/31/2018 at 10:34PM

12
#551 - Lorenzo Swank / @lswank

01/05/2019 at 04:56PM

12
#552 - Visualizing Medicine / @VisualizeMed

01/12/2019 at 07:38PM

12
#553 - Diogo Felix / @onlurking

01/19/2019 at 05:38AM

12
#554 - amal / @cdsudama

02/02/2019 at 02:35PM

12
#555 - Henrique Malheiro / @rike09

02/07/2019 at 02:06PM

12
#556 - Mateen Ulhaq / @sicariusnoctis

02/13/2019 at 05:44AM

12
#557 - Wei Wen / @goweiwen

02/14/2019 at 07:44PM

12
#558 - ahm4711 / @ahm4711

03/02/2019 at 08:35PM

12
#559 - andrwyoung / @andrwyoung1

03/03/2019 at 06:32AM

12
#560 - 李超 / @lichaorodxx

03/10/2019 at 05:47AM

12
#561 - Kim / @BiSaF

03/10/2019 at 10:16AM

12
#562 - zenwalker / @zenwalker93

03/11/2019 at 02:15PM

12
#563 - james_bunch / @james_bunch

03/19/2019 at 07:40AM

12
#564 - Vimfiz / @vimfiz

04/05/2019 at 12:39AM

12
#565 - longB / @longB77353628

04/06/2019 at 11:14AM

12
#566 - Tom Vyčítal / @Tamaasz

04/06/2019 at 09:40PM

12
#567 - David Accomazzo / @WordsofDefiance

04/11/2019 at 10:46PM

12
#568 - Michał Łowicki / @mlowicki

04/13/2019 at 05:35PM

12
#569 - alekfed / @alek_fed

04/15/2019 at 09:23AM

12
#570 - Benjamin Kiefer / @bkiefs

04/18/2019 at 08:47PM