Vim Javascript 函数内的缩进
Vim Javascript Indentation Inside A Function
我使用 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
我还通过 Pathogen 安装了 this。请帮我。谢谢。
将 filetype plugin indent on
添加到您的 vimrc
。
我使用 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
我还通过 Pathogen 安装了 this。请帮我。谢谢。
将 filetype plugin indent on
添加到您的 vimrc
。