I want to map braces to input opening braces to have this effect
int main(void){
//缩进了
}
I can achieve the effect by modifying the .vimrc in the home directory. The problem is that this setting is effective for all files.
C I want to have such an effect, but other languages (such as python/lua) I don't want to have such a mapping. How can I set up vim for a certain language?
Which file do you want to modify?
is also written in
.vimrc
, but the file type must be specified:(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