Re:Rust can be difficult to learn and frustrating, but it's ...
by namibj on Tuesday October 23, 2018 @05:09AM
(#18281888)
But the tooling for editing the code has no support for indenting blocks as trivially as adding braces.
Sure, you just run clang-format or such on the block/file, and get all the visual stuff sorted out.
[ Parent
| on HN ]
Re:Rust can be difficult to learn and frustrating, but it's ...
by olavk on Tuesday October 23, 2018 @06:17AM
(#18282160)
What editor does not support indenting a block? In most editors I know you select the block and hit tab, or shift-tab to outdent.
Re:Rust can be difficult to learn and frustrating, but it's ...
by namibj on Tuesday October 23, 2018 @10:05PM
(#18289119)
The difference is that I can add braces in the middle of multiple lines, just need to get my changes to match up, and then I can tell it to reformat the changed section/the whole file.
For block indenting, I have to select each block I want to operate on before issuing the block indent command.
Braces let me skip the selecting, requiring the same cursor movement but allowing batch insertion of selection begin/end markers, in a sense.
Re:Rust can be difficult to learn and frustrating, but it's ...
by village-idiot on Tuesday October 23, 2018 @08:15AM
(#18282668)
Or reformat the entire file according to global formatting styles, like IntelliJ.