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 9v006a90ad4d00000000084c

Filling braces

Inspired by a question on CoDidact (https://software.codidact.com/posts/296501), I wondered if Vim could offer a satisfactory ‘solution’ to this problem.

Start file
.ocean {}
.land {}
.sky {}
End file
.ocean {blue}
.land {green}
.sky {lightblue}

View Diff

1,3c1,3
< .ocean {}
< .land {}
< .sky {}
---
> .ocean {blue}
> .land {green}
> .sky {lightblue}

Solutions by @petr-kx:

Unlock 5 remaining solutions by signing in and submitting your own entry
Created by: @bemmesr

44 active golfers, 125 entries

Solutions by @petr-kx:
24
#6 - petr-kx / @petr-kx

09/11/2026 at 09:40AM

24
#>6 - petr-kx / @petr-kx

09/11/2026 at 09:41AM

26
#>13 - petr-kx / @petr-kx

09/11/2026 at 09:36AM

27
#>16 - petr-kx / @petr-kx

09/11/2026 at 09:34AM

28
#>18 - petr-kx / @petr-kx

09/10/2026 at 05:27AM