VIM and tab to space migration

Christophe Cavalaria chris.cavalaria at free.fr
Wed May 5 13:46:14 EDT 2004


Brian Quinlan wrote:
> The problem is that we now have a migration problem. Most of our
> develoeprs are using VIM which, AFAIK, is not intelligent enough to
> detect the current indentation style of a file. Modifying all of our
> source files at once to use spaces and then getting everyone to change
> their .vimrc is a posibility but not desirable because everyone would
> have to check in their work (whatever it's state) at the time of
> migration. Does anyone have any suggestions? Ideally, there would be
> some way to tell VIM to use the file's exsiting indentation style. That
> way I could slowly switch to spaces over time.
> 
> Cheers,
> Brian

Try adding that line at the end of each modified file :

# vim:sw=4:softtabstop=4:expandtab

It tells vim all the commands it should automatically run when it opens the
file and it should get you the correct behaviour for 4 spaces no tab
indentation.




More information about the Python-list mailing list