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
#211 - Eric Potter / @pottereric

06/11/2013 at 05:10PM

12
#212 - Javier Blanco / @jbgutierrez

06/20/2013 at 11:18PM

12
#213 - Adrian Roston / @akroston

06/26/2013 at 04:43PM

12
#214 - Maxime Dréau / @mdreau

06/27/2013 at 08:09PM

12
#215 - powertomato / @powertomato

06/27/2013 at 09:43PM

12
#216 - Bogdan Gusiev / @bgusiev

06/28/2013 at 08:46AM

12
#217 - Vincent Lee / @vincentleest

07/04/2013 at 06:39AM

12
#218 - Steve Tjoa / @stevetjoa

07/09/2013 at 04:11AM

12
#219 - Eric Alexander / @ericalexander

07/10/2013 at 07:52PM

12
#220 - arminas / @arminas

07/11/2013 at 07:58AM

12
#221 - Christopher Bahr / @bahrware

07/11/2013 at 07:47PM

12
#222 - Matt Robbins / @mcrmfc

07/12/2013 at 08:32AM

12
#223 - Roland Schatz / @fl_Overmind

07/12/2013 at 04:27PM

12
#224 - ———đίxίє—flαтlίиє——— / @_dixie_flatline

07/16/2013 at 05:17AM

12
#225 - Nathan Dial / @nathandial

07/16/2013 at 01:37PM

12
#226 - J Botsby / @j_botsby

07/17/2013 at 08:10AM

12
#227 - Andrew Dennis / @ALzonedOut

07/18/2013 at 01:19AM

12
#228 - Todd Branchflower / @toddbranch

07/18/2013 at 05:18PM

12
#229 - Shane Delmore / @ShaneDelmore

07/19/2013 at 03:06AM

12
#230 - Nathan / @NathanHarperoni

07/20/2013 at 10:54AM

12
#231 - Jeroen van der Neut / @jvdneut

07/20/2013 at 01:22PM

12
#232 - Nathan / @n8kowald

07/29/2013 at 08:39PM

12
#233 - Kevin Etienne / @42__kevin

08/18/2013 at 07:42PM

12
#234 - Michael Coles / @gen_ale_drinker

08/19/2013 at 01:00PM

12
#235 - Dom Armstrong / @dom_cycleface

08/22/2013 at 12:23PM

12
#236 - Chris Webb / @chriswebb_42

08/22/2013 at 10:40PM

12
#237 - Sheng / @shenghis

08/25/2013 at 08:21PM

12
#238 - Barry Nichols / @Barry_Nichols

08/27/2013 at 12:45AM

12
#239 - Dan / @dan_winkler

08/30/2013 at 10:31AM

12
#240 - David Beacham / @dbeacham_uk

08/31/2013 at 10:52AM