相关疑难解决方法(0)

Vim:gg = G左对齐,不自动缩进

当我尝试修复HTML文件的缩进时gg=G,每一行都会丢失其缩进并变为左对齐.有谁知道这里会发生什么?

的test.html

<html>
   <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>Indent test</title>
   </head>
   <body>
    <div id="test">
<div id="test2">
</div>          
    </div>
   </body>
</html>
Run Code Online (Sandbox Code Playgroud)

运行gg = G后的test.html:

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Indent test</title>
</head>
<body>
<div id="test">
<div id="test2">
</div>          
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

的.vimrc

".vimrc
" Thomas
"
" This file contains tips and ideas from a wide variety of sources. Since this is for personal use, I'm lazy about
" distributing credit.
"
" Thank you, everybody.
" 

" …
Run Code Online (Sandbox Code Playgroud)

html vim indentation

11
推荐指数
1
解决办法
9238
查看次数

标签 统计

html ×1

indentation ×1

vim ×1