4 ms·
TTifS(test2S&& TTSSSStest3)S{ // ... Show me an editor which can tell indentation from alignment at the beginning of the line. And moreover, which can tell
by dozzie 12y ago
TTifS(test2S&&
TTSSSStest3)S{
// ...
Show me an editor which can tell indentation from alignment at the beginning of the line. And moreover, which can tell it for a dozen of unrelated languages, like Perl, C, make, Erlang, XML and YAML.
- smt88 12y agoAll IntelliJ products[1], vim[2], and emacs[3] support this. They call it "smart tabs". Sublime has a plugin that does something similar[4]. I don't have it installed and can't find documentation for it, but I believe NetBeans does this by default. Again, this is something that usually happens naturally when you're indenting with tabs. Very few humans or programs are going to do alignment with tabs, even if they're indenting with them. 1. https://www.jetbrains.com/idea/help/code-style-java.html#d53261e130 https://www.jetbrains.com/idea/help/code-style-java.html#d53... 2. http://vim.wikia.com/wiki/Indent_with_tabs,_align_with_spaces#Smart_tabs http://vim.wikia.com/wiki/Indent_with_tabs,_align_with_space... 3. http://www.emacswiki.org/emacs/SmartTabs http://www.emacswiki.org/emacs/SmartTabs 4. http://wbond.net/sublime_packages/alignment http://wbond.net/sublime_packages/alignment
- dozzie 12y agoOK, and now explain me why none of these work correctly with all the mentioned languages.
- smt88 12y agoThey work fine with Perl, C, XML, and YAML. I wouldn't know about Erlang, but I'd imagine they work with that, too. It seems as though you have an idea in your head that you're unwilling to research, and when I present you with information, you're unwilling to accept that you could be wrong.
- dozzie 12y ago> They work fine with Perl, C, XML, and YAML. Or do they? Either they are language agnostic or they are not. If they are language-independent, they can't work properly, since indentation and alignment are syntax-specific (that is, need some information extracted from syntax). If they are language-specific, they can't work with all the languages I happen to need, which may include some DSLs rarely used by programmers and some languages defined by myself. I see no other option. I have checked plugin for Vim; it doesn't work as you advertise. It either puts only spaces or only tabs at the beginning of the line, depending on expandtab setting. I assume from your comment that others work as well as this one.