我的~/.vimrc包含以下内容(默认为Ubuntu14.04,刚刚添加了最后一行):
set smartindent
set tabstop=4
set shiftwidth=4
filetype plugin indent on在~/.vim/after/ftplugin/c.vim中
set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab我原以为只有.c和.h文件才能使用8列选项卡。但是,其他文件(如.html文件)也会受到影响。
如何使c.vim只影响与C相关的文件?
发布于 2014-10-16 15:28:52
改变这一点:
set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab对此:
setlocal tabstop=8 softtabstop=8 shiftwidth=8 noexpandtabhttps://stackoverflow.com/questions/26408134
复制相似问题