Python + vim + spaces vs tab

Jorgen Grahn grahn+nntp at snipabacken.se
Wed Jun 9 08:30:12 EDT 2010


On Mon, 2010-06-07, Neil Cerutti wrote:
> On 2010-06-07, Jean-Michel Pichavant <jeanmichel at sequans.com> wrote:
>> Hello,
>>
>> Does anyone knows a way to configure vim so it automatically
>> select to correct expandtab value depending on the current
>> buffer 'way of doing' ? I need to edit different files, some
>> are using spaces, others tabs. Those belong to different
>> projects, and changing all spaces to tabs is not an option for
>> me.
>>
>> I can't make vim automatically comply with the current buffer
>> coding style, anyone knows if it is possible ?
>
> :h filetypes will get you started on the right path. It'll be up
> to you to program the recognition logic. Do you have a heuristic
> in mind?
>
> You will be better off converting tabbed files to be tabless,
> which is pretty easy in vim.

But as he wrote, that is not an option.  And I can believe that -- if
you are many programmers, working in parallel on some fairly big and
mature project, the *last* thing you want is someone coming in and
reindenting everything.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .  .
\X/     snipabacken.se>   O  o   .



More information about the Python-list mailing list