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

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

54 active golfers, 173 entries

Solutions by @GavinKoeng:
21
#5 - Gavin / @GavinKoeng

04/18/2026 at 04:24AM

22
#>6 - Gavin / @GavinKoeng

04/18/2026 at 04:24AM

23
#>7 - Gavin / @GavinKoeng

04/18/2026 at 04:23AM

25
#>9 - Gavin / @GavinKoeng

04/18/2026 at 04:21AM

26
#>25 - Gavin / @GavinKoeng

04/18/2026 at 04:21AM

27
#>31 - Gavin / @GavinKoeng

04/18/2026 at 04:19AM

27
#>31 - Gavin / @GavinKoeng

04/18/2026 at 04:19AM

29
#>32 - Gavin / @GavinKoeng

04/18/2026 at 04:18AM

30
#>35 - Gavin / @GavinKoeng

04/18/2026 at 04:17AM

30
#>35 - Gavin / @GavinKoeng

04/18/2026 at 04:18AM

34
#>36 - Gavin / @GavinKoeng

04/18/2026 at 04:16AM

35
#>37 - Gavin / @GavinKoeng

04/18/2026 at 04:16AM

36
#>40 - Gavin / @GavinKoeng

04/18/2026 at 04:14AM

37
#>44 - Gavin / @GavinKoeng

04/18/2026 at 04:13AM

38
#>46 - Gavin / @GavinKoeng

04/18/2026 at 04:13AM

41
#>52 - Gavin / @GavinKoeng

04/18/2026 at 04:00AM

42
#>54 - Gavin / @GavinKoeng

04/18/2026 at 03:59AM