Re: folds and formatting
- From: "Andrew Poelstra" <joey.graham@xxxxxxxxx>
- Date: 13 Apr 2006 14:19:28 -0700
Bill Pursell wrote:
For several years now, "folding" has become more and more
common in text editors. That has had an affect on my
commenting style. For example, the appealing layout:
int
foo(void)
{
/** Brief explanation of foo.*/
...
}
has now changed to:
int
foo(void)
{ /** Brief explanation of foo.*/
...
}
I find the second layout ugly, but when you fold based on brackets,
the comment remains visible, while the comment in the first layout
gets hidden in the fold. Similarly,
if (expr) {
/* brief comment*/
statement;
}
Is now more convenient to write with the comment on the line with
the open brace.
I'm curious to know how folding is affecting people's sylistic
conventions.
I can't really think of where this belongs (perhaps comp.programmer),
so I'll just reply to it instead of complaining about your
offtopicness.
I have always used vi, and continue to do so. All of my folding text
editors (Notepad++ when I'm on Windows) allow me not to fold, and so I
don't. My style remains the same regardless of text editor trends.
Folding is only useful for when you need to scan for functions;
comments explaining the purpose of a function belong above the header,
and so won't be folded anyway.
.
- References:
- folds and formatting
- From: Bill Pursell
- folds and formatting
- Prev by Date: Incrementing a void pointer. Legal C99?
- Next by Date: Re: Modifying pointers of unknown type via a function call
- Previous by thread: folds and formatting
- Next by thread: Re: folds and formatting
- Index(es):
Relevant Pages
|
Loading