当我点击<head>...</head> Ctrl+Shift+F时,我需要Eclipse(开普勒)在中缩进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>
发布于 2015-09-27 20:54:05
您可以尝试转到:窗口>首选项> Web > HTML文件>编辑器。
从内联字段中添加/删除要缩进的内容。据我所见,它不包括head标签,所以尝试添加到列表中。
https://stackoverflow.com/questions/27146756
复制相似问题