您缩排HTML代码吗? [英] Do you indent your HTML code?
本文介绍了您缩排HTML代码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在编写代码时几乎痴迷于完美的缩进和对齐,但由于某种原因,我不喜欢缩进HTML标记。也许因为有些时候的缩进水平太深,但我通常只是(ab)使用VIM的折叠功能。这被认为是不好的做法吗?
I am almost obsessed with perfect indentation and alignment when writing code, but for some reason I don't feel comfortable indenting HTML markup. Maybe because some times the level of indentation gets too deep, but I usually just (ab)use VIM's folding feature. Is this considered bad practice? What's your style with markup indentation?
推荐答案
我做Indent,它保持东西可读性。
考虑缩进2个空格,而不是4或8.
我只缩进块元素,将其余的放在一行。
I do Indent, it keeps stuff readable. Consider indenting by 2 spaces instead of 4 or 8. I only indent block elements, put the rest on a single line.
这篇关于您缩排HTML代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文