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 by @hans_yelek:

Unlock 1 remaining solutions by signing in and submitting your own entry
Created by: @pradeep6kumar

75 active golfers, 202 entries

Solutions by @hans_yelek:
29
#69 - Hans Yelek / @hans_yelek

01/13/2017 at 07:09PM