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 1266 remaining solutions by signing in and submitting your own entry
#1267 Richard Kaufman / @sparragus - Score: 96 - 12/29/10 @ 14:56
:/<BS>%/<Left><Left><Right>s<Right>'aa'<Left>a<Right>/<Left><Left>x<Left><Right><Right><BS><BS><Left><Left><Left><BS><Right><Right><Right><Right><Right>xaaax/g<CR>:wq<CR>

0 comments


Created by: @wolever

1267 active golfers, 3898 entries

Leaderboard (lowest score wins):
32
#1261 - Chris Faulkner / @bookdarts

12/29/2010 at 12:39PM

34
#1262 - Timothy Hahn / @timyhahn

04/20/2012 at 03:31AM

36
#1263 - DJ Adams / @qmacro

12/29/2010 at 04:30PM

38
#1264 - Titan Tang / @titantang

12/29/2010 at 05:15AM

39
#1265 - Sushant / @sushftw

12/29/2010 at 06:15AM

66
#1266 - Attila / @attilaforgacs

01/29/2014 at 04:06AM

96
#1267 - Richard Kaufman / @sparragus

12/29/2010 at 02:56PM