-
Notifications
You must be signed in to change notification settings - Fork 142
Indention still doesn't work entirely as expected #44
Comments
I can still reproduce this under latest master. |
The indent problem is atom-wide (since 0.192 as far as I can tell): here. |
I also have problems with indenting HTML that contains tags that have line breaks in their opening tag. For example, have the following HTML: <div>
<div class="class1 class2" id="thatBrokenDiv"
height="100" width="100">
</div>
</div> When I highlight it and use the <div>
<div class="class1 class2" id="thatBrokenDiv"
height="100" width="100">
</div>
</div> The inner div's closing tag is not indented enough. I make a lot of Angular templates which can sometimes involve a LOT of custom attributes specified on the opening tags. To keep my code clean, I wrap the tags at 120 characters. This causes no end of problems when I go to auto-indent my HTML templates. |
I use atom 1.7.4 and have the same with @eviljoe issue when I write tag's attributes in multiple lines. Maybe someone can explain status regarding this issue |
No one (as far as I know) is actively working on this issue. |
still happening in 2020. Any workaround? |
@dariosalvi78, in 2020 I highly recommend you to use vs code :) For me now is no one reason to stay using atom Regarding the issue, I made fork https://github.com/rodmax/language-html-custom In which I quickly rewrite parser regexps |
yeah, I have tried VS code for a while, indentation works better, but I still prefer Atom for its simple interface TBH. It's a pity something so basic like indentation doesn't work as it should. There's also Atom beautify but it didn't solve my problem. |
@rodmax In my humble opinion, VSCode is excels at JS/TS front-end development. But in writing JS programs, specifically, npm packages, Atom is superior, mainly because of stellar Atom plugin work done by steelbrain. For example, VSCode ESLint plugin can't whitelist ESLint rules for autofixing — one can't even use AVA in VSCode because of this. Atom on other hand can whitelist ESLint autofixing. Of course, it's better to switch to node-tap which has the global |
@revelt I assume that the atom has plugins that are better than the vscode counterparts, but i just mean the follow:
And the main point today it is support and community,unfortunately the atom is losing popularity
the formula is simple: the more people around the product the better @dariosalvi78 you are right, vs-code by default have too many 🚥 enabled by default, personally i disabled all them and appearance looks like atom, simple and ascetic |
This issue was moved from atom/atom#4379.
Indention got much better in the latest releases, but consider the following HTML-Scenario:
When I copy the
<a/>
and paste it (2 empty spaces before), Sublime3 gives me (the expected result):in Atom (OSX, 0.152) it becomes:
Auto-Indent is turned on for
language-html
. It's not about the<a/>
-Tag - I can reproduce it with every other element aswell.The text was updated successfully, but these errors were encountered: