On 2008-12-22, Oliver Zheng wrote:

> Even if I *manually* space my way to param1 after the initial 2 tabs,
> Vim will convert my spaces to tabs when I >> or <<. Is there no way to
> let Vim recognize that spaces are a part of the contents and not
> indent? Of course, it would be much better if Vim could automatically
> insert spaces to the appropriate column when I break a statement into
> multiple lines.

There is no way that I know of.  The problem is the interface 
between the function that determines how much a particular line 
should be indented (based on the language, rules for that language, 
etc.) and the code that actually performs the indentation as you 
type or when you execute <<, >>, = and the like.  That function 
returns one number:  the number of spaces by which the line should 
be indented.  There is no mechanism to split this into so-many tabs 
followed by so-many spaces.

The 'preserveindent' and 'copyindent' options try to preserve the 
pattern of spaces and tabs used to indent a line, but I don't think 
they will do what you want.

I think your best bet is to write a formatting function that will 
repartition the indenting whitespace code according to your rules 
after you have typed it.

Regards,
Gary


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to