Seg*_*ult 21 html eclipse indentation auto-indent
<head>...</head>当我按下Ctrl + Shift + F时,我需要Eclipse(Kepler)缩进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>
Run Code Online (Sandbox Code Playgroud)
当我按下组合键时变成这个.
<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>
Run Code Online (Sandbox Code Playgroud)
我需要<head>...</head>缩进内部的所有内容以及其中的所有标记<html>...</html>.
理想情况下这样:
function func() {
console.log("Hello world");
}Run Code Online (Sandbox Code Playgroud)
<html>
<head>
<title>Insert title here</title>
<script type="text/javascript">
/* function */
</script>
</head>
<body>
<p onclick="func()">Some text</p>
</body>
</html>Run Code Online (Sandbox Code Playgroud)
您可以尝试转到:窗口 > 首选项 > Web > HTML 文件 > 编辑器。
添加/删除要从内联字段缩进的内容。据我所知,它不包含 head 标签,因此请尝试添加到列表中。