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

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 23 remaining solutions by signing in and submitting your own entry
#24 Dax / @zacoxi - Score: 109 - 08/30/19 @ 06:33
<C-V>Gf dgvgJ:s/\\\\n/<C-V><CR>/g<CR>dk2G.qqi"<C-O>f "<C-O>f <BS><BS>:<Esc>wi"<C-O>A",<Esc>qG@q/T<CR>~n.2Gqqi"<C-O>f ":<Right><Right><BS><BS><C-O>A,<Esc><CR>qV*<Esc>8:norm @q<CR>VHJI{ <Esc>A<BS> }<Esc>ZZ

0 comments


Created by: @mcr05

24 active golfers, 132 entries

Leaderboard (lowest score wins):
50
#1 - John Braxler / @braxler

08/20/2019 at 04:06PM

50
#2 - Saki Gw / @Sakigw

08/20/2019 at 09:33PM

50
#3 - james_bunch / @james_bunch

08/21/2019 at 10:42PM

50
#4 - Martin Delille / @martinodelilo

08/24/2019 at 04:56PM

50
#5 - Viktor Styrud / @ViktorStyrud

10/07/2019 at 07:09AM

50
#6 - Roman Privalov / @RomanPrivalov

09/30/2021 at 12:58PM

50
#7 - Aly Thobani / @alythobani

05/30/2024 at 11:46PM

50
#8 - Peppa Pig / @PeppaPi95550250

07/02/2024 at 07:10AM

50
#9 - nickGPT / @nickandbro

08/24/2024 at 02:37PM

51
#10 - Baine Wedlock / @BaineWedlock

09/12/2019 at 01:01PM

51
#11 - Mario Olofo / @mario_olofo

10/20/2019 at 12:44AM

51
#12 - Luoyb / @Luoyb

10/28/2023 at 07:11AM

55
#13 - Malcolm Sharpe / @blueblimpms

08/19/2019 at 07:23PM

55
#14 - Adam Hartz / @awareofnow

08/21/2019 at 01:08AM

61
#15 - Ron Holt / @ron_holt

08/19/2019 at 03:05AM

64
#16 - Matt / @mcr05

08/20/2019 at 09:40AM

66
#17 - Mr_Djez / @DjezMr

08/18/2019 at 07:22PM

70
#18 - RockerZZY / @rocker_zzy

06/17/2020 at 03:10AM

75
#19 - Ivo Blöchliger / @aigledesalpes

08/20/2019 at 08:26PM

75
#20 - sooqua / @sooqua

08/29/2019 at 01:14AM

79
#21 - zmf_tim / @zmf_tim

08/18/2019 at 10:08PM

79
#22 - Stefan Krist / @nerdyness_sk

08/20/2019 at 09:55AM

84
#23 - Jonathan Eidsness / @jonathaneidsnes

09/03/2019 at 10:50PM

109
#24 - Dax / @zacoxi

08/30/2019 at 06:33AM