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
#61 - Balkoth / @_Balkoth_

01/01/2011 at 08:11PM

12
#62 - David Lam / @lamdk

01/02/2011 at 06:29AM

12
#63 - derp derp / @derp__

01/02/2011 at 06:55AM

12
#64 - Pete Johns / @johnsyweb

01/02/2011 at 01:05PM

12
#65 - Stuart Gale / @bishboria

01/02/2011 at 04:38PM

12
#66 - vTsoumenis / @kioopi

01/02/2011 at 05:41PM

12
#67 - aimee / @sermoa

01/02/2011 at 05:58PM

12
#68 - Wei Dai / @clvv42

01/02/2011 at 11:19PM

12
#69 - Dsdfasdasf / @dsjflasjfsf

01/03/2011 at 02:57AM

12
#70 - Takayuki Tsukitani / @tsukkee

01/03/2011 at 06:49AM

12
#71 - Ben Hall / @Ben_Hall

01/03/2011 at 01:03PM

12
#72 - Nándor Komzák / @rubymood

01/03/2011 at 01:58PM

12
#73 - Benoît Ryder / @benoitryder

01/03/2011 at 08:16PM

12
#74 - JD Brossillon / @jdbrossillon

01/03/2011 at 08:35PM

12
#75 - Christopher Vollick / @psycotica0

01/04/2011 at 02:00AM

12
#76 - erik hinton / @erikhinton

01/04/2011 at 10:51PM

12
#77 - Iain / @theredbull

01/05/2011 at 10:39AM

12
#78 - Ujjwol Lamichhane / @Ujjwol

01/06/2011 at 12:18PM

12
#79 - Dov Murik / @dubek

01/06/2011 at 04:02PM

12
#80 - Gavin Gilmour / @_gavingilmour

01/07/2011 at 02:33PM

12
#81 - Ravil Bayramgalin / @brainopia

01/07/2011 at 09:51PM

12
#82 - Francisco Dibar / @frandibar

01/08/2011 at 05:14AM

12
#83 - Matt Tarbit / @mtarbit

01/09/2011 at 03:08PM

12
#84 - Federico Galassi / @federicogalassi

01/10/2011 at 10:53AM

12
#85 - ixulai / @ixulai

01/10/2011 at 04:58PM

12
#86 - Agus Lopez / @aguslr

01/10/2011 at 06:42PM

12
#87 - Thomas Schönwälder / @Masei1988

01/12/2011 at 04:18PM

12
#88 - Rob Ciaccio / @RobertoCalavera

01/13/2011 at 07:39AM

12
#89 - Joel Taylor / @joelteon_

01/13/2011 at 09:03PM

12
#90 - Nick / @quinks25

01/13/2011 at 09:27PM