当我按下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>