4 ms·
See also: Intelligent Indentation, Seriously — https://news.ycombinator.com/item?id=31478308 https://news.ycombinator.com/item?id=31478308
by webmaven 4y ago
See also: Intelligent Indentation, Seriously — https://news.ycombinator.com/item?id=31478308 https://news.ycombinator.com/item?id=31478308
- metadat 4y agoWhy "seriously"? I checked it out but was underwhelmed, maybe I just woke up and am missing something?
- breakingcups 4y agoIt's the title of the page.
- woojoo666 4y agoI'm a big supporter of elastic tab stops (in fact I had the same idea before seeing the original article), and I disagree with the criticisms laid out in "Intelligent indentation" [1]. > Elastic tabstops require editor support, and editor support is lacking This can change. Inserting multiple spaces when you press "tab" also used to be lacking in most text editors, now it is ubiquitous. We can likewise push for elastic tab stops > Elastic tabstops cannot adequately represent the code sample above. Under elastic tabstops, there would need to be a tab on the first line.... Not necessarily. The way I envision elastic tab stops is you can configure the IDE to typeset the file exactly how you like it. So you can tell the IDE to align function arguments. Or align `=` signs. And the IDE intelligently parses the code and figures out the correct indentation and alignment for each character. Maybe there's a file where the IDE can't parse it correctly. Ok, just disable intelligent indentation for that file, and it will display it in plain view. One benefit to this approach is that different people can have different preferences. This is similar to how you can already configure your IDE to change indentation width (if you use tabs for indentation). Just like how one person might like 2-char width indentation while others prefer 4-char width, one person might prefer aligning function arguments while others don't. These can all be configured. And if the user doesn't want to configure, the IDE comes with sane defaults. [1]: http://intellindent.info/seriously/ http://intellindent.info/seriously/