2008/12/24 Matt Wozniski <[email protected]>: > 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.
This is verging on the autistic. The main problem with complicated indentation schemes is getting all programmers in a group to follow them. Complicated suggestion: write a (simple) map to insert the correct number of spaces for you. Simple suggestion: just use two extra levels of indentation for continuation lines, like many people. --Antony --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "vim_use" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/vim_use?hl=en -~----------~----~----~----~------~----~------~--~---
