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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 34 remaining solutions by signing in and submitting your own entry
#35 Brian Hall / @_bruab_ - Score: 57 - 05/02/17 @ 13:24
jib_<Esc>llr_:%s/\./_/gc<CR>nyynnnyyyyykkkkk^ib_<Esc>jh.jjh.jh.jh.ZZ

0 comments


Created by: @anooplive

35 active golfers, 88 entries

Leaderboard (lowest score wins):
27
#1 - Saki Gw / @Sakigw

04/04/2017 at 12:33PM

27
#2 - Smylers / @Smylers2

04/04/2017 at 12:46PM

27
#3 - Paulo H Baumann / @PauloBaumann

04/04/2017 at 05:07PM

27
#4 - John Braxler / @braxler

04/04/2017 at 05:23PM

27
#5 - Urtica dioica / @udioica

04/05/2017 at 02:37AM

27
#6 - Remus Dalrymple / @bornintheflames

04/08/2017 at 12:36AM

27
#7 - 梧桐王子 / @WutongYujie

04/26/2017 at 01:30AM

27
#8 - 배효진 / @yaksaa21

08/18/2017 at 11:13AM

27
#9 - Turkey Man / @lvturkeyman

11/26/2017 at 06:37AM

27
#10 - Jon Krause / @jkrause314

12/21/2020 at 04:22PM

27
#11 - Luoyb / @Luoyb

11/17/2023 at 03:57AM

27
#12 - Peppa Pig / @PeppaPi95550250

07/02/2024 at 09:42AM

27
#13 - nickGPT / @nickandbro

08/28/2024 at 02:53AM

28
#14 - retro / @tryphopp

04/06/2017 at 11:38AM

28
#15 - Jean George / @JeanGeo20504212

06/27/2022 at 11:51AM

31
#16 - quemeraisc / @quemeraisc

03/21/2023 at 03:01PM

32
#17 - PL / @petrlaitoch

05/16/2017 at 09:41AM

33
#18 - Миша Сорокин / @rafmikovi4

04/09/2017 at 06:20AM

33
#19 - Daniel / @Daniel00288663

04/27/2017 at 12:13PM

33
#20 - DHM / @DHM29978992

05/20/2018 at 02:55AM

34
#21 - tPenguinLTG / @tpenguinltg

04/04/2017 at 02:55PM

35
#22 - Reinaldo Astudillo / @astudillor

04/04/2017 at 09:44AM

35
#23 - えるざっぷ / @_elzup_

04/05/2017 at 09:51AM

35
#24 - Roland TheFreak / @_TheFreak_

04/14/2017 at 09:36AM

36
#25 - Jerry Wu / @AzureSpectra

05/16/2017 at 03:40PM

36
#26 - D. 👋 / @DCT_cpp

02/10/2022 at 05:51PM

37
#27 - James Houghton / @jamesthoughton

05/16/2017 at 03:48PM

37
#28 - Jonas Sunde V / @sunde_v

08/04/2017 at 06:47PM

37
#29 - Sergio Semedi / @SergioSemedi

03/14/2018 at 06:57PM

38
#30 - Dom Armstrong / @dom_cycleface

04/05/2017 at 11:37AM