Vim不会自动执行我正在处理的C源文件,虽然它声称当我输入:set命令时启用了autoindent和cindent选项.当我输入一些代码时,什么也没发生.比如写作
int main()
{
return 0;
}
Run Code Online (Sandbox Code Playgroud)
"返回0;" 声明留在左边.但是,如果我键入"= G"命令,我的文件将缩进.
这是我的配置:
vimrc分为/ etc/vim/vimrc和〜/ .vimrc.连接内容如下:
runtime! debian.vim
if has("syntax")
syntax on
endif
set background=dark
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
if has("autocmd")
filetype plugin indent on
endif
set showcmd
set showmatch
if filereadable("/etc/vim/vimrc.local")
source …Run Code Online (Sandbox Code Playgroud)