4 ms·
Hmm. Emacs' indentation is one of the things I've had to fight hardest. It's extremely opinionated, and it's almost always wrong for each new language I teach i
by barrkel 10y ago
Hmm. Emacs' indentation is one of the things I've had to fight hardest. It's extremely opinionated, and it's almost always wrong for each new language I teach it about, and it took a lot of convincing to indent C and Java the way I want.
The way it defaulted to using smart fill (i.e. use indent div 8 tabs followed by indent mod 8 spaces), so that indentation had this mix of indent and spaces, gah.
It's bad enough that I wrote my own plain non-smart auto-indent (just replicate indent of previous line) to get by in modes I couldn't convince to be sane.
The fact that there is no real unification for your preferred indentation step is really telling. I have a big block configuring c-basic-offset, js-indent-level, css-indent-offset, etc. - a big random bag of different variables that affect different subsets of language modes, depending on their lineage.
- james-mcelwain 10y agoI use Emacs for languages I work continuously in and have strong (or am forming) opinions about. Willing to invest 1-2 hrs configuring. Save it in a git repo. Not everyone share's preferences (tabs, spaces, etc.) across languages. Maybe I'm crazy but I use 2 vs 4 in different languages. If I'm just trying a language out for the first time, I find it much easier to use vscode + vim plugin + language plugin to try something out.
- eyko 10y agoBut then you have to update your settings every time you collaborate on a different project with different opinions about indenting. The right way would be for emacs to simply respect the project's .editorconfig file like any other editor does, but I can't for the life of me make emacs open JavaScript files and set up indentation properly with editorconfig. It totally defeats the purpose...