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 5e4dfcccaa2db400090b66c3

prepend * to every non-blank line

Prepend an asterisk to every non-blank line in the input file.

Start file
This is a
very short

file, but it is 
still
full

of

surpises.
End file
*This is a
*very short

*file, but it is 
*still
*full

*of

*surpises.

View Diff

1,2c1,2
< This is a
< very short
---
> *This is a
> *very short
4,6c4,6
< file, but it is 
< still
< full
---
> *file, but it is 
> *still
> *full
8c8
< of
---
> *of
10c10
< surpises.
---
> *surpises.

Solutions by @fishermryn:

Unlock 13 remaining solutions by signing in and submitting your own entry
Created by: @johnreitano

1517 active golfers, 6208 entries

Solutions by @fishermryn:
10
#146 - 于吉星 / @fishermryn

05/21/2020 at 11:00AM

10
#>146 - 于吉星 / @fishermryn

05/21/2020 at 11:02AM

11
#>541 - 于吉星 / @fishermryn

05/21/2020 at 09:59AM

12
#>767 - 于吉星 / @fishermryn

05/21/2020 at 09:58AM

13
#>812 - 于吉星 / @fishermryn

05/21/2020 at 09:55AM

14
#>850 - 于吉星 / @fishermryn

05/21/2020 at 09:54AM

15
#>929 - 于吉星 / @fishermryn

05/21/2020 at 09:49AM

16
#>1011 - 于吉星 / @fishermryn

05/21/2020 at 09:46AM

19
#>1192 - 于吉星 / @fishermryn

05/21/2020 at 09:45AM

20
#>1245 - 于吉星 / @fishermryn

05/21/2020 at 09:42AM

21
#>1310 - 于吉星 / @fishermryn

05/21/2020 at 09:41AM

22
#>1355 - 于吉星 / @fishermryn

05/21/2020 at 09:35AM

24
#>1419 - 于吉星 / @fishermryn

05/22/2020 at 08:28AM