对于使用lapply的匿名R函数,Vim自动缩进太远了

问题描述 投票:0回答:1

对于以下R代码,Vim自动缩进太远(超过4个空格):

lapply(1:10, function(x){
       Something here
})

我该如何解决?

这里是图片:

Vim autoindents too far with an lapply

r vim indentation
1个回答
0
投票
只需使用.vimrc选项shiftwidth(用于2个空格):

set shiftwidth=2

来源:http://vimdoc.sourceforge.net/htmldoc/options.html#'shiftwidth'

© www.soinside.com 2019 - 2024. All rights reserved.