【发布时间】:2014-11-26 10:30:26
【问题描述】:
当我点击 Ctrl+Shift+F
时,我需要 Eclipse(Kepler) 在<head>...</head> 中缩进 html 标签
目前,这个:
<html>
<head>
<title>Insert title here</title>
<script type="text/javascript">
function func() {
console.log("Hello world");
}
</script>
</head>
<body>
<p onclick="func()">Some text</p>
</body>
</html>
当我按下组合键时变成这个。
<html>
<head>
<title>Insert title here</title>
<script type="text/javascript">
function func() {
console.log("Hello world");
}
</script>
</head>
<body>
<p onclick="func()">Some text</p>
</body>
</html>
我需要缩进<head>...</head> 中的所有内容以及<html>...</html> 中的所有标签。
最好这样:
function func() {
console.log("Hello world");
}
<html>
<head>
<title>Insert title here</title>
<script type="text/javascript">
/* function */
</script>
</head>
<body>
<p onclick="func()">Some text</p>
</body>
</html>
【问题讨论】:
-
以下链接似乎有你要找的东西:stackoverflow.com/questions/17892094/…
-
改用 vscode :D
标签: html eclipse indentation auto-indent