How to turn off expandtab for editing makefiles
To turn off expandtab for editing makefiles, put the following in your vimrc:
autocmd FileType make setlocal noexpandtab
I already put the following in my vimrc,but it didn't work when editing makefile.Vim still change tab into spaces.
Here is my vimrc,is there anything wrong ?
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
"behave mswin
syntax on
set expandtab
set tabstop=4
set shiftwidth=4
autocmd FileType make setlocal noexpandtab
set autoindent
set cindent
set nu
set diffexpr=MyDiff()
set nobackup
let &termencoding=&encoding
|