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

1631 active golfers, 5007 entries

Leaderboard (lowest score wins):
12
#721 - Ilya Shakirov / @aelaau

03/11/2024 at 03:31PM

12
#722 - luke37842 / @luke37842

05/14/2024 at 09:19PM

12
#723 - weiss-i-net / @weiss-i-net

05/26/2024 at 10:57PM

12
#724 - Aly Thobani / @alythobani

05/28/2024 at 12:44AM

12
#725 - Peppa Pig / @PeppaPigSg

06/01/2024 at 04:26PM

12
#726 - TobSick / @TobSick

06/05/2024 at 09:59AM

12
#727 - SanderHestvik / @SanderHestvik

06/08/2024 at 09:44PM

12
#728 - Sai-Lokesh-PSV / @Sai-Lokesh-PSV

06/17/2024 at 06:49AM

12
#729 - alexeypetrenko / @alexeypetrenko

06/27/2024 at 12:54PM

12
#730 - wutwere / @wutwere

06/30/2024 at 10:46PM

12
#731 - Petro Mudrievskyj / @petemud

07/01/2024 at 09:16AM

12
#732 - Justin Choi / @Mcthecuber

07/01/2024 at 04:45PM

12
#733 - Colonelviied / @Colonelviied

08/07/2024 at 11:25PM

12
#734 - Suhaib Murshid / @suhaibm

08/17/2024 at 11:00AM

12
#735 - Rob Koster / @robkoster

08/19/2024 at 07:15PM

12
#736 - Diwakar Singh Parmar / @parmardiwakar150

08/27/2024 at 12:21PM

12
#737 - nickGPT / @nickandbro

08/29/2024 at 12:12AM

12
#738 - KoroneListener / @KoroneListener

09/03/2024 at 02:47PM

12
#739 - reatter / @reatter

09/17/2024 at 03:59PM

12
#740 - nmiller987 / @nmiller987

09/25/2024 at 05:56PM

12
#741 - Tsimon Dorakh / @Tsimon-Dorakh

10/10/2024 at 06:39PM

12
#742 - xscript71 / @xscript71

10/14/2024 at 08:51AM

12
#743 - Brice Bischoff / @B-Bischoff

10/26/2024 at 10:15AM

12
#744 - countime / @countime

11/27/2024 at 04:13PM

12
#745 - Alexander Ivanov / @karamfil

11/29/2024 at 12:37AM

12
#746 - bounce114 / @bounce114

12/02/2024 at 07:21AM

12
#747 - interminable007 / @interminable007

01/05/2025 at 01:32PM

12
#748 - Colin Benner / @yzhs

01/12/2025 at 01:53PM

12
#749 - Brando / @brandonce

01/23/2025 at 11:13AM

12
#750 - Sergii Pidgornyi / @spodgorn

02/14/2025 at 01:50PM