On 27/05/08 20: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. Plus
> somehow the '#' in the first column is pretty much ubiquitous now.
> Almost every project I've hacked uses this rule!
>
>> 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...
>
> GI
>

Yeah, here's a short example from Vim's src/feature.h (the rest of the 
sources are indented in a similar way):

> #if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
>       && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
> # if defined(MSWIN) || defined(DJGPP) || defined(OS2) || defined(VMS) || 
> defined(MACOS) || defined(AMIGA)
> #  define FEAT_BIG
> # else
> #  ifdef MSDOS
> #   define FEAT_SMALL
> #  else
> #   define FEAT_NORMAL
> #  endif
> # endif
> #endif

Best regards,
Tony.
-- 
People who are funny and smart and return phone calls get much better
press than people who are just funny and smart.
                -- Howard Simons, "The Washington Post"

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

Raspunde prin e-mail lui