As previously requested, it would be nice if jedit would automatically recognize the
"#if 0" CPP directive used to comment out large blocks of C-code.
This was previously requested under Artifact ID # 2023939, but was rejected for various
reasons.
I am re-requesting this because:
1) this functionality is readily available in gedit; if there, why not in jedit?
2) the previous rejection noted that this is CPP processing, which is true, but I'm
not sure I see the point. It is a CPP directive that means "code does not exist",
much like the comment directive /\*...\*/ means to the compiler that "code does not
exist". Why is there a perceived difference between what the first pass and the second
pass of the compiler does when the effect is the same, code has been commented out
and the editor should tag it as such and draw accordingly.
3) that there can be embedded #if statements is also true, and? count the #if and
corresponding #endif's and comment out everything between #if 0 and its corresponding
#endif.
Why? because this is a very standard manner of blocking out large chunks of C code.
That jedit does not recognize this is a shame and a shortcome of its C-code syntax
highlighting functionality.
And, because gedit does have this, I really don't see why it wouldn't be handled just
because the functionality comes with "issues" ('#if 0' with two blanks, e.g.).
Please re-consider this request, and when doing so, recall that an application's functionality
follows standard usage, not the other way around.
thanks, and thanks for a great program\!
richard boaz
Submitted | nobody - 2009-09-28 12:21:50 | Assigned | |
---|---|---|---|
Priority | 5 | Labels | core |
Status | open | Group | None |
Resolution | None |
2009-09-28 19:31:59 k_satoda |
> 2) the previous rejection noted that this is CPP processing, which is true,
|
---|---|
2009-10-30 09:44:19 *anonymous |
Let me rephrase my point.
|
2009-10-30 14:45:47 daleanson |
Actually, using #if 0 is not only a common practice, it is a recommended practice.
See the Mozilla C++ Portability Guide: https://developer.mozilla.org/en/C___Portability_Guide
|
2009-10-30 18:41:22 k_satoda |
No one is "in power" about jEdit. It's a open source software and
|
2009-10-31 10:26:29 k_satoda |
For a person who has come here likely as a big fan of "#if 0", here are
|
2009-10-31 11:06:55 *anonymous |
you are mixing apples and oranges. the recommendation of \*not\* using #if 0 to which
you refer in your last comment refers to permanent code that is intended for release
(and, it must be noted, for ultimate portability).
|
2009-10-31 13:56:35 *anonymous |
>> jEdit already satisfies the needs to color the block in "#if 0" if an
|