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
#451 - 王运 / @640138017

07/22/2016 at 06:37AM

12
#452 - André Peric Tavares / @AndrePeric

07/24/2016 at 05:41PM

12
#453 - Martin Tõnusoo / @martintonusoo

07/25/2016 at 12:36AM

12
#454 - Benjamin Espey / @bennyty

07/25/2016 at 04:03PM

12
#455 - Meninx / @_Meninx_

07/30/2016 at 12:15PM

12
#456 - Will / @obiwan__k3n00bi

07/31/2016 at 06:58PM

12
#457 - apan apansson / @apanapanssonapa

08/10/2016 at 04:14PM

12
#458 - Abdullah / @dada3mn

08/11/2016 at 05:50AM

12
#459 - Stanislav / @prstad

08/23/2016 at 02:22PM

12
#460 - jdupont655 / @jdupont655

09/02/2016 at 01:41PM

12
#461 - Stephen Aument / @saument

09/03/2016 at 11:57PM

12
#462 - 이선협 / @kciter

09/05/2016 at 11:35AM

12
#463 - loki2441 / @loki2441

09/10/2016 at 09:57PM

12
#464 - Rasmus / @SBareSSomErMig

09/16/2016 at 09:21PM

12
#465 - Constantine / @ConstantineHatz

09/26/2016 at 07:27PM

12
#466 - trx / @trxdbg

10/13/2016 at 12:58AM

12
#467 - Bill Ruddock / @biinari

10/31/2016 at 04:25AM

12
#468 - Etienne Florent / @EtienneFlorent

11/24/2016 at 11:14PM

12
#469 - Vojtěch Vobr / @vvobr

12/04/2016 at 02:32PM

12
#470 - ABS JOHNSON / @ABSJOHNSON1

12/16/2016 at 02:17AM

12
#471 - Nessig / @Nessig5

12/18/2016 at 12:41PM

12
#472 - Douglas Roper / @dougdroper

12/20/2016 at 01:50PM

12
#473 - Marcel Akkerman / @MarcelAkkerman

12/23/2016 at 09:22AM

12
#474 - Zhihong Liu / @pieapple03

02/19/2017 at 01:53PM

12
#475 - sijinyuan / @sijinyuan

02/20/2017 at 01:36AM

12
#476 - Dan Prince / @danj_prince

02/25/2017 at 02:16AM

12
#477 - Jim Bob / @babyclubber

02/28/2017 at 12:34AM

12
#478 - Eric Bakan / @ericbakan

03/15/2017 at 12:02AM

12
#479 - Alexander Bessonov / @nonsleepr

03/15/2017 at 09:04PM

12
#480 - Daniel / @Daniel00288663

03/21/2017 at 12:26PM