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 @foobar01123:

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

73 active golfers, 186 entries

Solutions by @foobar01123:
19
#19 - Miłosz Łakomy / @foobar01123

07/02/2020 at 09:28AM

20
#>24 - Miłosz Łakomy / @foobar01123

06/30/2020 at 12:12PM

21
#>26 - Miłosz Łakomy / @foobar01123

06/29/2020 at 09:22AM

22
#>33 - Miłosz Łakomy / @foobar01123

06/29/2020 at 09:21AM

23
#>42 - Miłosz Łakomy / @foobar01123

06/28/2020 at 09:35AM

23
#>42 - Miłosz Łakomy / @foobar01123

06/29/2020 at 09:20AM

25
#>51 - Miłosz Łakomy / @foobar01123

06/27/2020 at 07:52AM

27
#>58 - Miłosz Łakomy / @foobar01123

06/26/2020 at 02:13PM