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 58e30bf5a570cf043d000002

Format java properties

Format java properties to a different format. The value which is the string following the first '=' cannot & should not change. All periods in the key get replaced with an underscore "_" and get a prefix of "b_".

Start file
# Set a.b
a.b=123
x.y.z=xyz.def
tini=00.x
# Change url to qa
url=http://aabb.com/cache=true
debug.java-options=-Xmx2g
a.b.c.d.e=twenty

End file
# Set a.b
b_a_b=123
b_x_y_z=xyz.def
b_tini=00.x
# Change url to qa
b_url=http://aabb.com/cache=true
b_debug_java-options=-Xmx2g
b_a_b_c_d_e=twenty

View Diff

2,4c2,4
< a.b=123
< x.y.z=xyz.def
< tini=00.x
---
> b_a_b=123
> b_x_y_z=xyz.def
> b_tini=00.x
6,8c6,8
< url=http://aabb.com/cache=true
< debug.java-options=-Xmx2g
< a.b.c.d.e=twenty
---
> b_url=http://aabb.com/cache=true
> b_debug_java-options=-Xmx2g
> b_a_b_c_d_e=twenty

Solutions by @GavinKoeng:

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

37 active golfers, 100 entries

Solutions by @GavinKoeng:
27
#14 - Gavin / @GavinKoeng

03/16/2026 at 06:21AM

28
#>16 - Gavin / @GavinKoeng

03/16/2026 at 06:21AM

31
#>17 - Gavin / @GavinKoeng

03/16/2026 at 06:20AM

32
#>18 - Gavin / @GavinKoeng

03/16/2026 at 06:20AM

33
#>21 - Gavin / @GavinKoeng

03/16/2026 at 06:19AM

34
#>22 - Gavin / @GavinKoeng

03/16/2026 at 06:18AM

36
#>27 - Gavin / @GavinKoeng

03/16/2026 at 06:17AM

37
#>30 - Gavin / @GavinKoeng

03/16/2026 at 06:18AM

39
#>32 - Gavin / @GavinKoeng

03/16/2026 at 06:15AM

41
#>35 - Gavin / @GavinKoeng

03/16/2026 at 06:16AM

45
#>36 - Gavin / @GavinKoeng

03/16/2026 at 01:38AM