On 22/12/08 22:22, Oliver Zheng wrote:
> Hi,
>
> Is that possible? It solves the tab/space indentation debate, but how
> is this done in Vim? For example, the code:
>
> int main() {
> <tab>if (1)
> <tab><tab>int a = test(
> <tab><tab>.............param1,
> <tab><tab>.............param2,
> <tab><tab>............);
> }
>
> would look perfectly fine no matter what tabwidth is, in whatever
> editor. How do I enable this? It seems that Vim coerces all
> indentation whitespace to tabs plus some spaces that aren't long
> enough for the width of a tab. Does Vim also make this language
> dependent? (E.g. For python, I would assume it has a different scheme
> of handling automatic indentation.)
>
> Thanks,
> Oliver
See
:help 'copyindent'
:help 'preserveindent'
:help 'expandtab'
For Python, Vim forces hard tabs to 8 columns, because that's what the
Python standards say they are. You can still have "soft tabs" of a
different width, of course, or use 'expandtabs' to convert tabs to
spaces as you type them. Language-dependent settings of this kind are
usually set by a filetype-plugin.
See
:help ftplugins
:help filetype-plugins
Best regards,
Tony.
--
What does it mean if there is no fortune for you?
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---