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
#31 - Mark McD ☠ / @snuff_man

12/30/2010 at 08:56AM

12
#32 - Marcin Kulik / @sickill

12/30/2010 at 09:05AM

12
#33 - Addisu Taddese / @azeey

12/30/2010 at 09:16AM

12
#34 - Dan Smith / @untermrad

12/30/2010 at 09:43AM

12
#35 - Ben Lenarts / @benlenarts

12/30/2010 at 10:30AM

12
#36 - Benoit D / @Anbcorp

12/30/2010 at 12:30PM

12
#37 - Danny Dulai / @dannydulai

12/30/2010 at 08:37PM

12
#38 - Alain Gilbert / @alain_gilbert

12/30/2010 at 10:52PM

12
#39 - Rafael França / @rafaelfranca

12/30/2010 at 11:24PM

12
#40 - Juan C. Muller / @juancmuller

12/31/2010 at 04:10AM

12
#41 - Tony Hillerson / @thillerson

12/31/2010 at 06:02AM

12
#42 - Jim Mussared / @jim_mussared

12/31/2010 at 06:03AM

12
#43 - Douglas Stockwell / @dstockwell

12/31/2010 at 06:36AM

12
#44 - Vincent Isambart / @vincentisambart

12/31/2010 at 11:16AM

12
#45 - Peter Gibson / @p_gibson

12/31/2010 at 11:56AM

12
#46 - Guillaume Bonnoron / @gbonnoron

12/31/2010 at 12:25PM

12
#47 - wyl rof / @wylrof

12/31/2010 at 01:29PM

12
#48 - woodspock / @woodspock

12/31/2010 at 01:29PM

12
#49 - Tobias Praetsch / @tpraetsch

12/31/2010 at 02:59PM

12
#50 - Leeward Bound / @leewardbound

12/31/2010 at 03:56PM

12
#51 - Christoph Stock / @christophstock

12/31/2010 at 04:28PM

12
#52 - optixx / @optixx

12/31/2010 at 04:58PM

12
#53 - Rod Cloutier / @RodCloutier

12/31/2010 at 05:11PM

12
#54 - Casey W Crites / @caseycrites

12/31/2010 at 08:34PM

12
#55 - Tim Chase / @gumnos

01/01/2011 at 12:17AM

12
#56 - Will Gray / @graywh

01/01/2011 at 12:52AM

12
#57 - Andrew Chen / @anjrewchen

01/01/2011 at 03:06AM

12
#58 - Matthew Draper / @_matthewd

01/01/2011 at 04:50AM

12
#59 - Lee Marlow / @lmarlow

01/01/2011 at 06:32AM

12
#60 - Stephan Weller / @stephan_weller

01/01/2011 at 07:14PM