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

1474 active golfers, 4450 entries

Leaderboard (lowest score wins):
28
#1441 - John / @fuzzyfuzz

12/29/2010 at 03:23AM

28
#1442 - Stefan Wintermeyer / @wintermeyer

12/29/2010 at 12:18PM

28
#1443 - Tomasz Muszynski / @herkii

12/31/2010 at 12:39PM

29
#1444 - papersmith / @papersmith

12/29/2010 at 02:43AM

29
#1445 - Nacho Barrientos / @nachobarrientos

12/29/2010 at 12:19PM

31
#1446 - Josh / @karlw00t

12/29/2010 at 01:23AM

31
#1447 - Josh Davey / @joshuadavey

12/29/2010 at 04:21AM

32
#1448 - Chris Faulkner / @bookdarts

12/29/2010 at 12:39PM

32
#1449 - Muzhou / @Muzhou11

02/01/2020 at 01:19AM

33
#1450 - lin / @l_shi1

01/31/2020 at 08:45AM

33
#1451 - HungkaiSun / @HungkaiSun

02/01/2020 at 01:21AM

34
#1452 - Timothy Hahn / @timyhahn

04/20/2012 at 03:31AM

36
#1453 - DJ Adams / @qmacro

12/29/2010 at 04:30PM

38
#1454 - Titan Tang / @titantang

12/29/2010 at 05:15AM

39
#1455 - Sushant / @sushftw

12/29/2010 at 06:15AM

39
#1456 - Logan Ladd / @LoganLadd3

01/27/2020 at 05:13AM

40
#1457 - Austin / @Austin57093958

01/22/2020 at 01:24AM

40
#1458 - Connor Van Meter / @connorvm

01/31/2020 at 03:24AM

47
#1459 - Colton Weeding / @Doc_Glen_Townie

01/30/2020 at 09:30PM

48
#1460 - Ryan Pallman / @RyanPallman

01/30/2020 at 10:11PM

49
#1461 - Jason P Bengtson / @bengtson_p

01/30/2020 at 10:21PM

52
#1462 - Alonso Darias / @alonso_darias

01/31/2020 at 07:26AM

53
#1463 - firehaert_18 / @Firehaert1

01/31/2020 at 06:34AM

57
#1464 - Norhan Abbas / @NorhanAbbas4

02/01/2020 at 12:04AM

63
#1465 - alex ekstrom / @alexekstrom07

01/30/2020 at 08:07PM

64
#1466 - Ransom Bowman / @BowmanRansom

01/31/2020 at 07:08AM

66
#1467 - Attila / @attilaforgacs

01/29/2014 at 04:06AM

68
#1468 - Arnold / @Arnold59755

01/22/2020 at 05:57AM

71
#1469 - Josh Gruber / @Jevitate

01/23/2020 at 02:13AM

74
#1470 - Justin Williams / @DRPEPPERGUY1

01/27/2020 at 07:37PM