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
#511 - vimthrowaway / @vimgolf_throw

04/08/2018 at 09:03AM

12
#512 - DHM / @DHM29978992

04/15/2018 at 12:26AM

12
#513 - Evgeny`s Kindle / @EvgenyKindle

04/25/2018 at 07:45AM

12
#514 - 石奕心 / @allenshih1

06/07/2018 at 01:59AM

12
#515 - Justin Hoyt / @JustinHoyt24

06/23/2018 at 05:09PM

12
#516 - Daniël De Koker / @daniel_koker

06/28/2018 at 01:45PM

12
#517 - Chris Dean / @ChrisDe62379742

07/11/2018 at 05:31PM

12
#518 - niwatoco / @yoshitune9

07/20/2018 at 03:16PM

12
#519 - Andrew Ouzts / @andrew_ouzts

07/22/2018 at 05:08AM

12
#520 - fucus / @fishlovebanana

07/29/2018 at 10:38AM

12
#521 - Matthew Mackay / @matthewmackay26

08/03/2018 at 03:56PM

12
#522 - Micheal Wells / @michealwwells

08/03/2018 at 05:53PM

12
#523 - fsj / @FrogzSJ

08/12/2018 at 08:47AM

12
#524 - Francesco Sacchi / @depsir

08/16/2018 at 07:28AM

12
#525 - Zach Johnson / @zachjohnsondev

08/16/2018 at 02:09PM

12
#526 - PCS Solutions / @PeteSolutions

08/16/2018 at 06:37PM

12
#527 - Ano Nym / @AnoNym39473378

08/18/2018 at 01:11PM

12
#528 - Roberto Martínez / @nilp0inter

08/27/2018 at 10:15PM

12
#529 - Coruja Queridinha / @miriamretka

08/30/2018 at 10:50PM

12
#530 - Jeff / @sir_wiggles3

09/09/2018 at 05:41AM

12
#531 - royer / @RoyerMoyer1

09/11/2018 at 05:45AM

12
#532 - Bart3k / @Bart3k3

09/12/2018 at 07:23AM

12
#533 - Brendan B Amdocs / @AmdocsB

09/24/2018 at 04:58PM

12
#534 - Rasmus Bergström / @JRasmusBm

09/29/2018 at 07:29AM

12
#535 - Brandon Hops / @BrandonHops

09/29/2018 at 05:56PM

12
#536 - Artūras Zakrevskis / @AZakrevskis

10/04/2018 at 02:55PM

12
#537 - Paul Inc / @hiniol1982

10/19/2018 at 04:41PM

12
#538 - Benjamin Kiesl / @BenjaminKiesl

10/20/2018 at 10:50AM

12
#539 - Fabio Branquinho / @branquif

11/08/2018 at 10:31PM

12
#540 - Dax / @zacoxi

11/09/2018 at 02:43AM