我有
vim 7.3,默认情况下使用Ubuntu 11.04提供的设置.我的.vimrc如下所示:
set nocompatible set autoindent set tabstop=4 set softtabstop=4 set shiftwidth=4 set expandtab filetype plugin indent on let g:omni_sql_no_default_maps = 1 " Stops Omni from grabbing left/right keys " Syntax,colorscheme and status line directives omitted.
如何针对不同的文件类型(例如PHP,phtml,rb)有选择地禁用此缩进?
到目前为止,我已经尝试了autocmd FileType PHP filetype插件缩进和一些变体,但我还没有太多运气.
Prince对autocmd的建议对我不起作用.这样做:
filetype plugin on autocmd BufRead,BufNewFile * filetype indent off autocmd BufRead,BufNewFile *.py filetype indent on
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。