On Tue, Dec 23, 2008 at 11:26 PM, Tony Mechelynck wrote: > > On 24/12/08 01:04, Oliver Zheng wrote: >> >> So it seems like there is no feature available. I guess I'll request >> this feature on vim.org. > > It's hard for Vim to guess that in > > if (a == b && > c == d && > e == f) > > you want c aligned with a (and not, let's say, one level of indent > further than the "if").
Unless you're using, say, cindent, or an indentexpr, which give you absolute control over that sort of thing. > However, as others have repeatedly said, with > ":set autoindent copyindent" (and maybe 'preserveindent' but I'm less > sure what it does), when you hit Enter after "c == d &&", the third line > will get the exact same mixture of tabs and spaces as the second one. Which is still a far cry away from properly using tabs for indenting blocks and spaces for aligning code automatically. Like I said before, vim just isn't capable of doing the right thing here, and changing that would require making a way for indentexpr's to specify "number of spaces of indent" and "number of spaces for alignment" independently. ~Matt --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
