我想把大括号映射成输入左大括号就有这样的效果
int main(void){
//缩进了
}
我通过修改home目录下的.vimrc可以达到效果,问题是这样设置是对所有的文件都有效的,
C++我想有这样的效果,但是别的语言(如python/lua)我不想有这样的映射,怎样针对某种语言进行vim的设置呢?
要修改哪个文件呢?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
也是写在
.vimrc
里,但是要指定文件类型:(no)autoindent
ai
(no)cindent
ci
(no)smartindent
si
tabstop=X
ts
shiftwidth=X
sw
(no)expandtab
(no)et
softtabstop=X
sts
(no)smarttab
(no)sta