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 5d59205be4bef300096bc66b

Reformat Cura settings

Cura settings are weirdly encoded... After mere replacements, you'll have to enquote two strings (infill_pattern & speed_travel) and dont forget booleans in lowercase. #format #json

Start file
;SETTING3 "[data]\\n\\ninfill_pattern = gy
;SETTING3 roid\\ninfill_sparse_density = 1
;SETTING3 0\\njerk_print = 10\\nmaterial_p
;SETTING3 rint_temperature = 195\\nretract
;SETTING3 ion_amount = 6\\nretraction_hop_
;SETTING3 enabled = True\\nretraction_hop_
;SETTING3 only_when_collides = True\\nskir
;SETTING3 t_gap = 10\\nskirt_line_count = 
;SETTING3 2\\nspeed_print = 50\\nspeed_tra
;SETTING3 vel = =speed_print if magic_spir
;SETTING3 alize else 120\\n\\n"
End file
{ "infill_pattern": "gyroid", "infill_sparse_density": 10, "jerk_print": 10, "material_print_temperature": 195, "retraction_amount": 6, "retraction_hop_enabled": true, "retraction_hop_only_when_collides": true, "skirt_gap": 10, "skirt_line_count": 2, "speed_print": 50, "speed_travel": "=speed_print if magic_spiralize else 120" }

View Diff

1,11c1
< ;SETTING3 "[data]\\n\\ninfill_pattern = gy
< ;SETTING3 roid\\ninfill_sparse_density = 1
< ;SETTING3 0\\njerk_print = 10\\nmaterial_p
< ;SETTING3 rint_temperature = 195\\nretract
< ;SETTING3 ion_amount = 6\\nretraction_hop_
< ;SETTING3 enabled = True\\nretraction_hop_
< ;SETTING3 only_when_collides = True\\nskir
< ;SETTING3 t_gap = 10\\nskirt_line_count = 
< ;SETTING3 2\\nspeed_print = 50\\nspeed_tra
< ;SETTING3 vel = =speed_print if magic_spir
< ;SETTING3 alize else 120\\n\\n"
---
> { "infill_pattern": "gyroid", "infill_sparse_density": 10, "jerk_print": 10, "material_print_temperature": 195, "retraction_amount": 6, "retraction_hop_enabled": true, "retraction_hop_only_when_collides": true, "skirt_gap": 10, "skirt_line_count": 2, "speed_print": 50, "speed_travel": "=speed_print if magic_spiralize else 120" }

Solutions by @jonathaneidsnes:

Unlock 2 remaining solutions by signing in and submitting your own entry
Created by: @mcr05

19 active golfers, 102 entries

Solutions by @jonathaneidsnes:
84
#18 - Jonathan Eidsness / @jonathaneidsnes

09/03/2019 at 10:50PM

92
#>18 - Jonathan Eidsness / @jonathaneidsnes

09/03/2019 at 10:45PM