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 54cb9296b2df9e000307809a

Winning streak

Make the number on each line equal the consecutive L's or W's.

Start file
W 1
W 1
W 1
L 1
L 1
W 1
L 1
L 1
L 1
W 1
W 1
W 1
L 1
W 1
W 1
W 1
W 1
L 1
L 1
L 1
End file
W 1
W 2
W 3
L 1
L 2
W 1
L 1
L 2
L 3
W 1
W 2
W 3
L 1
W 1
W 2
W 3
W 4
L 1
L 2
L 3

View Diff

2,4c2,3
< W 1
< W 1
< L 1
---
> W 2
> W 3
5a5
> L 2
8,11c8,9
< L 1
< L 1
< W 1
< W 1
---
> L 2
> L 3
12a11,12
> W 2
> W 3
15,19c15,17
< W 1
< W 1
< W 1
< L 1
< L 1
---
> W 2
> W 3
> W 4
20a19,20
> L 2
> L 3

Solutions by @__Coos:

Unlock 11 remaining solutions by signing in and submitting your own entry
Created by: @udioica

51 active golfers, 135 entries

Solutions by @__Coos:
25
#8 - Janzen / @__Coos

09/30/2022 at 03:01PM

26
#>23 - Janzen / @__Coos

09/30/2022 at 03:00PM

27
#>28 - Janzen / @__Coos

09/30/2022 at 02:59PM

28
#>28 - Janzen / @__Coos

09/30/2022 at 02:58PM

30
#>31 - Janzen / @__Coos

09/30/2022 at 02:55PM

33
#>32 - Janzen / @__Coos

09/30/2022 at 02:53PM

35
#>34 - Janzen / @__Coos

09/30/2022 at 02:53PM

36
#>37 - Janzen / @__Coos

09/30/2022 at 02:47PM

37
#>41 - Janzen / @__Coos

09/30/2022 at 02:46PM

41
#>49 - Janzen / @__Coos

09/30/2022 at 02:37PM

42
#>51 - Janzen / @__Coos

09/30/2022 at 02:36PM