5 ms·
What you describe is not what the author (and I) want. You should not use tabs until it is no longer possible, you should only use tabs to indicate the indentat
by acon 17y ago
What you describe is not what the author (and I) want. You should not use tabs until it is no longer possible, you should only use tabs to indicate the indentation level. To perform further alignment beyond the indentation, for example to align arguments to a function after the opening parenthesis you use spaces.
- whatusername 17y agoUnless you're using Python of course :)
- jrockway 17y agoIn most cases, the behavior is identical. I think as you implement what the article describes, you will find it to be tedious and impractical in real-world use.
- philh 17y agoMost cases isn't good enough. Exceptions are still frequent, such as this example FTA: SomeClass::SomeClass() _____.:.InheritingClass(false, false _____...................5, 10, true, _____...................bleh, blah) As compared to SomeClass::SomeClass() _____.:.InheritingClass(false, false ____________________....5, 10, true, ____________________....bleh, blah) Which will no longer align if tabstops are changed. I've set up emacs to do the right thing in c-mode, and possibly in other modes which inherit from it. It's not hard to find a solution online, but it's certainly not "out of the box".
- __david__ 17y ago> I've set up emacs to do the right thing in c-mode Would you mind posting a .emacs snippet? I've tried to do it in the past and got the impression it was not possible. I'd love to see what you did.
- philh 17y agoWhat I use is here: http://philh.net/smart-tab.el http://philh.net/smart-tab.el Which is a (very slightly) modified version of what I foud here: http://bytes.inso.cc/wp/2009/01/07/dot-emacs-smarter-indentation-with-tabs-and-spaces/ http://bytes.inso.cc/wp/2009/01/07/dot-emacs-smarter-indenta... This seems to be a more language-agnostic approach: http://www.emacswiki.org/emacs/SmartTabs http://www.emacswiki.org/emacs/SmartTabs
- jart 17y agoWow, people have been telling me this was impossible for years. Thanks :D