To get the visual editor to generate nice code, ensure any block templates you create have
"format": "{{_|_=_}}\n"
(as inline
but with trailing newline)
or "format": "{{_\n|_=_\n}}\n"
(improved version of block
)
in the TemplateData—see docs.
This is unfortunately necessary to do on each individual template since the named aliases are hardcoded.
(Getting the generated invocation to not be in sentence case is a lost cause. It seems to honour what was entered manually though.)