[Wolves] tabs, VI and Makefiles

sparkes sparkes at westmids.biz
Wed Jan 19 16:24:41 GMT 2005

I have a very strange question for all the programmers out there.

When I am programming I have my editor set to replace tabs with spaces 
(I use 2 but I am not here to start a religious war ;-) ) as most people 
do (at least these days, but this is a religious debate).

My vi is set not to expand tabs to spaces to keep compatibility with 
system files that don't like it.

This is no problem when I am developing C because all whitespace is 
equally ignored.  When I am using python it becomes a problem because 
python doesn't see tabs as equaling the same number of spaces that I see 
in my editor, this is only a problem when cutting and pasting example 
code and is obvious.  The problem comes with makefiles.

Makefiles use tabs and not spaces so I have to switch editor when I am 
editing these.

Is there anyway I can set up vim to expand tabs to 2 spaces in all files 
except those called Makefile ?



More information about the Wolves mailing list