[Wolves] tabs, VI and Makefiles

Ade adrian.bradshaw at gmail.com
Wed Jan 19 16:40:10 GMT 2005


On Wed, 19 Jan 2005 16:24:07 +0000, sparkes <sparkes at westmids.biz> wrote:
> 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 ?
> 
> cheers
> 
> sparkes

Surely the solution is to stop using Python and continue using C    :-P



More information about the Wolves mailing list