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):
13
#871 - Simon Cheng / @bambooraccoon

01/25/2018 at 06:02PM

13
#872 - John C Shea / @MHSSachems

01/29/2018 at 12:05PM

13
#873 - Arijus / @argshook

02/07/2018 at 09:35AM

13
#874 - Lisa Ugray / @lisa_ugray

03/16/2018 at 05:36PM

13
#875 - Fichera Gaetano / @gaetanofic

04/11/2018 at 09:24AM

13
#876 - Jonathan Camilleri / @Too_Many_Taken

05/26/2018 at 12:39PM

13
#877 - Tact Overflow / @muppling

06/06/2018 at 03:42PM

13
#878 - qed / @qed13308565

07/25/2018 at 04:44PM

13
#879 - 默罕默德 / @Rt6RjEAJ987Woes

01/22/2019 at 12:46PM

13
#880 - Olle Nordesjö / @Rasinj

04/20/2019 at 09:43PM

13
#881 - Vladimir Leskov / @vladimirlesk

11/23/2019 at 10:55AM

13
#882 - Scott Smith / @Scottaino

01/07/2020 at 05:32PM

13
#883 - BnnGolfer / @BnnGolfer

03/20/2020 at 06:11PM

13
#884 - soundscope / @__soundscope__

06/30/2020 at 11:51AM

13
#885 - Michel Viktor / @tomkpz

07/29/2021 at 02:34AM

13
#886 - blabla zincou / @BZincou

03/08/2022 at 08:29PM

13
#887 - Jens / @jigfox

05/06/2022 at 10:03AM

13
#888 - lytoooo0 / @lytoooo0

02/27/2023 at 01:20AM

13
#889 - xiaoao1024 / @xiaoao1024

04/24/2024 at 11:35AM

13
#890 - OsamaElkadeem / @OsamaElkadeem

09/01/2024 at 05:48PM

14
#891 - Kerry Buckley / @kerryb

12/29/2010 at 08:03AM

14
#892 - johnny / @johnnychm

12/29/2010 at 01:28PM

14
#893 - Simon Edwardsson / @_SimEdw_

12/29/2010 at 04:10PM

14
#894 - George Hampton / @gdhamp

12/29/2010 at 05:24PM

14
#895 - David Rivers / @davidmrivers

12/29/2010 at 07:59PM

14
#896 - PA Parent / @paparent

12/30/2010 at 01:03AM

14
#897 - thelaney / @thelaneythelazy

12/30/2010 at 04:20AM

14
#898 - krazylegz / @krazylegz

12/30/2010 at 05:04AM

14
#899 - Andy Brett / @andrewpbrett

12/30/2010 at 08:32AM

14
#900 - Behnam Esfahbod / @zwnj

12/30/2010 at 12:59PM