I generally format multi-line comments in my C source code like this:
/*
* This is the first line of the comment.
* This is the second line.
* This is the last line.
*/
Is there a way to get equivalent behavior from BBEdit's text
wrapping? Neither "Text > Hard Wrap" nor "Text > Rewrap Quoted Text"
seem to do the right thing.
Search : (^\s*)(\b)
Replace: \1\* \2
I then close the docblock, with a clipping.
I also have another clipping for continuing the comment, which is useful if I'm only writing short lines.
I find that with hot keys set for the clippings this is pretty quick. It is certainly fast enough for me not to think 'I must improve that', although if you do I'd love to hear how!
Regards,
Carlton
> All this seems like a lot of effort for something that Emacs deals
> with automatically. (Hint hint, Bare Bones...)
This doesn't resonate with me, because I don't write comments.
R.
(p.s. :-))
--
Rich Siegel Bare Bones Software, Inc.
<sie...@barebones.com> <http://www.barebones.com/>
Someday I'll look back on all this and laugh... until they sedate me.
This doesn't resonate with me, because I don't write comments.
R.
(p.s. :-))
> All this seems like a lot of effort for something that Emacs deals
> with automatically. (Hint hint, Bare Bones...)
I agree and would love to see some enhancements in handling comments.
In the mean time, however, I just use "//" for all my C-style block
comments. The Rewrap Quoted Text command works nicely with them and
double slashes happen to be the standard coding style in my group
anyway. :-)
-Dennis
On Sep 17, 11:19 am, "Carlton Gibson" <carlton.gib...@gmail.com>
wrote:
> I have a similar usage and what I do is to start the comment block, using aHi Carlton,
> clipping. I then type my comment, without the *s.
That sounds like it would work when you first write the comment, but
what about revising a comment that's already formatted this way? Do
you also have a text factory to remove the "*" prefixes so you can
rewrap it?
All this seems like a lot of effort for something that Emacs deals
with automatically. (Hint hint, Bare Bones...)
I used to use this format, but with syntax coloring, it seems kind of
pointless.
/*
Comments go here
on multiple lines
*/
Shows up as an obvious comment not only in bbedit, but in vim as well.
--
"Katrina, $4 gas, a trillion dollar war, rising unemployment,
deregulated housing market, global warming...NO MORE!"
http://is.gd/2mxY
I used to use this format, but with syntax coloring, it seems kind of
On 18-Sep-2008, at 02:45, Carlton Gibson wrote:
> /**
> * This is the first line of the comment.
> * This is the second line.
> * This is the last line.
> */
pointless.
/*
Comments go here
on multiple lines
*/
Shows up as an obvious comment not only in bbedit, but in vim as well.