On 2008/05/27, at 14:48, Gautam Iyer wrote:
> On Tue, May 27, 2008 at 02:26:50PM -0400, James Widman wrote: > >> However, ISO conformance is pretty ubiquitous these days, so having >> '0#' by default in cinkeys is now an anachronism. It should be >> removed because it can cramp people's styles. > > I have a feeling that some people *like* the '#' in the first > column. I > personally disliked it initially, but have grown to like it now. But many others are forced to use the style used in the source code in an existing project, not the style that Vim tries to force you to grow to like. >> For example, some people like to indent >> conditionally-compiled code as in: >> >> #ifdef A >> #ifdef FOO >> #define BAR 1 >> #else >> #define BAR 2 >> #endif >> #else >> #define BAR 3 >> #endif /* A */ > > The indentation I see often in code is > > #ifdef A > # ifdef FOO > # define BAR 1 > # else > # define BAR 2 > # endif > #else > # define BAR 3 > #endif /* A */ > > Preserving the sacred "# in first column" rule... :s/sacred/bogus/ Note, I'm not looking at it not as a stylistic "rule", but as an alleged core language rule---i.e., a rule allegedly followed by compilers to determine the semantics of a program. I'm looking at it that way because that's what the Vim documentation implies. In that sense, the rule is bogus, and that's a verifiable fact; refer to the ISO Standards. But if we're talking about it as a *style*, its sacredness is in the eye of the beholder anyway, so Vim and its documentation should not try to push you in one direction or the other. With '0#' removed by default, '#' can be indented with '>'. Some people might not intend to do that, but that's at least what one would expect with '>'. What one would *not* expect is for no indentation to happen at all. So there is a user interface guideline to observe here: that of least surprise. James Widman -- Gimpel Software http://gimpel.com --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
