首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

vim 编辑makefile文件时,如何才能让tab不要被转换为空格呢

2012-03-15 
vim 编辑makefile文件时,怎么才能让tab不要被转换为空格呢?在vimrc里了加了这一行autocmd FileType makefi

vim 编辑makefile文件时,怎么才能让tab不要被转换为空格呢?
在vimrc里了加了这一行
autocmd FileType makefile set noexpandtab 

为什么编辑makefile时输入tab还会被转成空格。

Here is my .vimrc:


set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
"behave mswin
syntax on
set expandtab "使用空格代替tab. 
set tabstop=4
set shiftwidth=4
autocmd FileType makefile set noexpandtab
set autoindent
set cindent
set nu
set diffexpr=MyDiff()
set nobackup
let &termencoding=&encoding

[解决办法]
autocmd FileType make set noexpandtab

热点排行