3 ms·
It’s quicker to move code around with whitespace because you can just tab it in and out, move lines etc. The best solution is to ban tabs entirely from the syn
by fire_lake 2y ago
It’s quicker to move code around with whitespace because you can just tab it in and out, move lines etc.
The best solution is to ban tabs entirely from the syntax - only allow spaces in multiples of 2.
- dartos 2y agoI can’t agree with that. Curly bracket blocks are obviously visible at a glance. If I incorrectly move one around it’s obvious. If I shift tab a section of python code around, I may be breaking an if state without noticing if I didn’t pay attention to a specific colon on one line. Imo s-expressions are the easiest to move around, but have the same issue of being hard to scan as tabs.
- fire_lake 2y agoWhitespace works better in the context of statically typed functional programming, I’ll give you that!
- lylejantzi3rd 2y agoIt's easier and quicker to move code around with braces when you're using vim. Vim has motions for selecting, editing, copying, etc everything between two braces. Without the braces, it makes moving that code around much more difficult, and error prone.
- lawn 2y agoAlthough I agree in general you can configure capture and move to be whitespace sensitive, for example by relying on tree-sitter.