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

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

1537 active golfers, 6312 entries

Solutions by @nickandbro:
10
#450 - nickGPT / @nickandbro

08/24/2024 at 01:40PM

11
#>758 - nickGPT / @nickandbro

08/24/2024 at 01:40PM

12
#>808 - nickGPT / @nickandbro

08/24/2024 at 01:40PM

13
#>844 - nickGPT / @nickandbro

08/24/2024 at 01:40PM

14
#>909 - nickGPT / @nickandbro

08/24/2024 at 01:40PM

15
#>998 - nickGPT / @nickandbro

08/24/2024 at 01:39PM

16
#>1092 - nickGPT / @nickandbro

08/24/2024 at 01:39PM

17
#>1151 - nickGPT / @nickandbro

08/24/2024 at 01:39PM

18
#>1189 - nickGPT / @nickandbro

08/24/2024 at 01:39PM

19
#>1240 - nickGPT / @nickandbro

08/24/2024 at 01:39PM

20
#>1308 - nickGPT / @nickandbro

08/24/2024 at 01:39PM

21
#>1349 - nickGPT / @nickandbro

08/24/2024 at 01:39PM

29
#>1492 - nickGPT / @nickandbro

08/24/2024 at 01:39PM

30
#>1497 - nickGPT / @nickandbro

08/24/2024 at 01:38PM

31
#>1501 - nickGPT / @nickandbro

08/24/2024 at 01:38PM

32
#>1502 - nickGPT / @nickandbro

08/24/2024 at 01:38PM

33
#>1505 - nickGPT / @nickandbro

08/24/2024 at 01:38PM

34
#>1507 - nickGPT / @nickandbro

08/24/2024 at 01:38PM

35
#>1511 - nickGPT / @nickandbro

08/24/2024 at 01:38PM

36
#>1515 - nickGPT / @nickandbro

08/24/2024 at 01:37PM

37
#>1518 - nickGPT / @nickandbro

08/24/2024 at 01:37PM

38
#>1520 - nickGPT / @nickandbro

08/24/2024 at 01:37PM

41
#>1522 - nickGPT / @nickandbro

08/24/2024 at 01:37PM

45
#>1524 - nickGPT / @nickandbro

08/24/2024 at 01:37PM

47
#>1525 - nickGPT / @nickandbro

08/24/2024 at 01:37PM

49
#>1526 - nickGPT / @nickandbro

08/24/2024 at 01:36PM

50
#>1530 - nickGPT / @nickandbro

08/24/2024 at 01:36PM

57
#>1531 - nickGPT / @nickandbro

08/24/2024 at 01:36PM

65
#>1532 - nickGPT / @nickandbro

08/24/2024 at 01:36PM

69
#>1532 - nickGPT / @nickandbro

08/24/2024 at 01:36PM

80
#>1533 - nickGPT / @nickandbro

08/24/2024 at 01:35PM

373
#>1535 - nickGPT / @nickandbro

08/24/2024 at 01:32PM

404
#>1536 - nickGPT / @nickandbro

08/24/2024 at 01:10PM