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

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

24 active golfers, 132 entries

Solutions by @james_bunch:
50
#3 - james_bunch / @james_bunch

08/21/2019 at 10:42PM

55
#>13 - james_bunch / @james_bunch

08/19/2019 at 08:48PM

61
#>15 - james_bunch / @james_bunch

08/19/2019 at 07:06AM

66
#>17 - james_bunch / @james_bunch

08/18/2019 at 10:51PM

70
#>17 - james_bunch / @james_bunch

08/18/2019 at 05:28PM

82
#>22 - james_bunch / @james_bunch

08/18/2019 at 05:22PM