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 57fbb753ab6108077204f440

7th Birthday

We have a bunch of numbers written from 0 to 9 in the order present in the text input file. The task is to create 7 by replacing the numbers with dashes.

Start file
12345678901234
23456789012345
34567890123456
45678901234567
56789012345678
67890123456789
78901234567890
89012345678901
90123456789012
End file
12-----------
2--56789012--5
3456789012--56
456789012--567
56789012--5678
6789012--56789
789012--567890
89012--5678901
9012--56789012

View Diff

1,9c1,9
< 12345678901234
< 23456789012345
< 34567890123456
< 45678901234567
< 56789012345678
< 67890123456789
< 78901234567890
< 89012345678901
< 90123456789012
---
> 12-----------
> 2--56789012--5
> 3456789012--56
> 456789012--567
> 56789012--5678
> 6789012--56789
> 789012--567890
> 89012--5678901
> 9012--56789012

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 48 remaining solutions by signing in and submitting your own entry
#49 Nicolás Alvarez / nicoa_bb_ba_ar - Score: 27 - 02/18/17 @ 21:41
llv$r-x:%s/34/--/g<CR>3GR34<Esc>ZZ

0 comments


#50 Michael Ficarra / jspedant - Score: 27 - 05/26/17 @ 22:55
<Down>R2--<Esc><Up>v$r-$xqa<Down>r-<Left>r-q7@aZZ

0 comments


#51 Jon E. Eguiluz / viroide - Score: 28 - 10/11/16 @ 09:31
:%s/.\zs34/--/g<CR>ggf5v8lr-xZZ

0 comments


#52 Apox / apox159 - Score: 28 - 11/27/16 @ 20:01
ll12r-x:%s/34/--/g<CR>3G2s34<Esc>ZZ

0 comments


#53 Michał Dytko / DytkoM - Score: 28 - 12/21/16 @ 11:05
$xvF3r-:%s/34/--/g<CR>3Gr3lr4ZZ

0 comments


#54 andresote / andresote - Score: 28 - 02/18/17 @ 21:43
llv$-r-x:%s/34/--/g<CR>3GR34<Esc>ZZ

0 comments


#55 Pradeep Kumar / pradeep6kumar - Score: 29 - 10/10/16 @ 16:44
:%s/^\@<!34/--/g<CR>ggf5v8lr-xZZ

0 comments


#56 Hans Yelek / hans_yelek - Score: 29 - 01/13/17 @ 19:09
:%s/34/--/g<CR>3GR34<Esc>Hf-v$r-$xZZ

0 comments


#57 Solomon / Trugbildjaeger - Score: 29 - 04/15/17 @ 14:24
llv$r-x:s<BS>%s/34/--/g<CR>3GR34<Esc>ZZ

0 comments


#58 Dmitry Teslenko / krab_mozga - Score: 30 - 06/27/17 @ 07:46
$xvF3r-:%s/34/--/g<CR>3Gr31<Esc>lr4ZZ

0 comments


#59 Petar Saulic / gorillawarfare9 - Score: 31 - 10/27/17 @ 12:41
f3v$r-$xqq$jF4vhr-q7@q2Glvlr-ZZ

0 comments


#60 Gurukandhamoorthi / Gurukandhamoor1 - Score: 33 - 07/13/17 @ 12:00
llv$r-$x<Esc>j0lr-lr-$hqqr-hr-jq7@qZZ

0 comments


#61 captain_morgan / captain_morgan - Score: 41 - 10/17/16 @ 21:08
  v$r-$x<CR>:s/34/--/g<CR><CR>/<CR>R--<Esc><CR>VG:s/34/--<CR>ZZ

0 comments


Created by: pradeep6kumar

61 active golfers, 141 entries

Leaderboard (lowest score wins):
19
#1 - Urtica dioica / udioica

10/11/2016 at 02:33AM

19
#2 - Stanislav / prstad

10/11/2016 at 08:06AM

19
#3 - Nikos Kwlos / Kwlos_Calling

10/11/2016 at 08:24PM

19
#4 - Jon Krause / jkrause314

10/12/2016 at 07:26AM

19
#5 - John Braxler / braxler

10/13/2016 at 03:12PM

19
#6 - Nico / _Nico_Caro

10/14/2016 at 03:26AM

19
#7 - mk61 / aringba

10/14/2016 at 10:17AM

19
#8 - Josh Callender / Saponifi3d

10/17/2016 at 01:46AM

19
#9 - Brian Mego / Major251

10/17/2016 at 03:27AM

19
#10 - John Barbero Unenge / JBarberU

10/19/2016 at 11:44AM

19
#11 - Bill Ruddock / biinari

10/31/2016 at 02:48AM

19
#12 - Davis Fields / i301585

11/04/2016 at 10:50PM

19
#13 - Marin Usalj / _supermarin

11/09/2016 at 11:59PM

19
#14 - Jon Louie / jjisnow

11/24/2016 at 02:50AM

19
#15 - Liam S Ismail / AC01Y

12/06/2016 at 06:36PM

19
#16 - Colby Hamilton / ColbyHamilton5

04/20/2017 at 08:06PM

19
#17 - Turkey Man / lvturkeyman

11/23/2017 at 06:03PM

20
#18 - Kerson Hsiao / KersonHsiao

10/30/2016 at 08:31AM

20
#19 - Saki Gw / Sakigw

11/02/2016 at 03:33PM

20
#20 - Daniel / Daniel00288663

03/27/2017 at 12:10PM

21
#21 - Smylers / Smylers2

10/10/2016 at 06:52PM

22
#22 - mnx / mnxx

11/14/2016 at 02:14PM

22
#23 - Benedikt Ames / wisp3rwind

01/29/2017 at 07:15PM

22
#24 - Alex Linden / alexwlinden1

04/20/2017 at 07:57PM

22
#25 - jakeroberts / jakeroberts

05/27/2017 at 07:52PM

22
#26 - Jacob Buete / JBuete

07/02/2017 at 02:50PM

22
#27 - DHM / DHM29978992

04/30/2018 at 05:45PM

23
#28 - Byaruhanga Franklin / byaruhaf

10/10/2016 at 08:59PM

23
#29 - tPenguinLTG / tpenguinltg

10/11/2016 at 12:42AM

23
#30 - Tuomas Poikela / tuomaspoi

10/17/2016 at 09:18PM