我的主编辑器使用 MacVim 已有一段时间了。我主要将它用于 javascript,具体来说是 express.js,而困扰我的一件事是它的缩进。
我希望缩进这样做:
app.get('/', function(req, res) {
res.send("Hello, world!");
});
但现在它正在这样做:
app.get('/', function(req, res) {
res.send("Hello, world!");
});
我不知道为什么会这样。对于额外信息,这是我的 .vimrc:
execute pathogen#infect()
set tabstop=4
set smartindent
set autoindent
我还有this通过病原体安装。请帮我。谢谢。
最佳答案
添加 filetype plugin indent on
到你的 vimrc
。
关于javascript - 函数内的 Vim Javascript 缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38964496/