How can I avoid expanding tab into sapces when editing makefile.
After googling,I get to know that if I add
filetype plugin on
into my vimrc,vim will verify different file type.
I search $VIMRUNTIME/filetype.vim and found out:
" Makefile
au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak,*.dsp setf make
Then I looked into $VIMRUNTIME/ftplugin/make.vim and found out:
" Make sure a hard TAB is used, required for most make programs
setlocal noexpandtab softtabstop=0
In coclusion, when editing makefile,vim should not expand tab.But it did.I don't know why. All I want is to avoid expanding tab into sapces when editing makefile.
Any help will be appreciated!
Here is my vimrc:
set nocompatible
syntax on
set expandtab
set tabstop=4
set shiftwidth=4
set autoindent
set cindent
set nu
set diffexpr=MyDiff()
set nobackup
filetype plugin on
|