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 1548 remaining solutions by signing in and submitting your own entry
#1549 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

1549 active golfers, 4676 entries

Leaderboard (lowest score wins):
12
#661 - hepebexè / @hepebexe

12/08/2020 at 06:43PM

12
#662 - kafang plays vimgolf / @KafangV

12/17/2020 at 10:15AM

12
#663 - Brian :| / @Seeemplicity

12/25/2020 at 06:54AM

12
#664 - Jung Yeon Park / @park_jungy

01/08/2021 at 05:44PM

12
#665 - Ray Dennis / @raysden

01/08/2021 at 09:16PM

12
#666 - soppeldynga / @soppeldynga

01/10/2021 at 08:27PM

12
#667 - A A A / @37fatos

01/13/2021 at 03:39PM

12
#668 - thundertentronckh / @thundertentron1

05/08/2021 at 12:04AM

12
#669 - Danko Milutinovic / @zebraReverse

05/08/2021 at 03:45PM

12
#670 - Tobi Tesuji / @TobiTesuji

05/15/2021 at 09:50PM

12
#671 - joao neto / @joaonet49907796

05/17/2021 at 02:32PM

12
#672 - Scott Atkins / @scottrick49

06/28/2021 at 01:58PM

12
#673 - vim_maxter / @MaxterVim

07/02/2021 at 02:09PM

12
#674 - 0xdrowsy / @0xdrowsy

07/02/2021 at 02:20PM

12
#675 - Ska / @skaa42

07/16/2021 at 06:37PM

12
#676 - lydxn / @lydxn1

07/24/2021 at 10:56PM

12
#677 - Sergio / @SergioVl12

07/25/2021 at 03:42AM

12
#678 - yu xie / @yuxie21997666

09/15/2021 at 12:05PM

12
#679 - Scott Berger / @scottberger

09/24/2021 at 03:55PM

12
#680 - Jean George / @JeanGeo20504212

09/27/2021 at 08:17PM

12
#681 - Salvador Tojo Quintela / @SalvadorTojo

10/08/2021 at 06:52PM

12
#682 - literally a 🐝 / @abbie_is_here

10/29/2021 at 03:35PM

12
#683 - migoo / @migoo00668679

11/06/2021 at 01:27PM

12
#684 - Flimsy Giraffe / @flimsy_giraffe

11/28/2021 at 12:28AM

12
#685 - july9793 / @july9793_

01/06/2022 at 02:38PM

12
#686 - shahanavaz m / @shahanavazm

02/13/2022 at 03:33AM

12
#687 - JVIM / @JVIM101

02/23/2022 at 04:33PM

12
#688 - anonymouse / @anonymo65837183

04/01/2022 at 06:46AM

12
#689 - ff df / @ffdf93207177

04/18/2022 at 02:53AM

12
#690 - Ron / @ronnie9ball

05/20/2022 at 05:16AM