Author Topic: How to set settings for multi-line C comments?  (Read 629 times)

Paul9876

  • Junior Community Member
  • Posts: 9
  • Hero Points: 0
How to set settings for multi-line C comments?
« on: May 18, 2016, 08:29:02 pm »
I know you can do things for doxygen comments, but I can't figure out how to do what I want for C comments. Currently this is what happens
Code: [Select]
/* this is a comment that I want [return hit here]
    to span multiple lines */

What I would like to see is this:
Code: [Select]
/* this is a comment that I want [return hit here]
 * to span multiple lines
 */

Basically, if I hit [enter] somewhere within the comment I want the next line to start with a * with the cursor 1 space away and for the closing */ to be on its own line.

Is there a way to do this?

Paul

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1959
  • Hero Points: 81
Re: How to set settings for multi-line C comments?
« Reply #1 on: May 18, 2016, 08:31:03 pm »
Try starting the comment with "/**".

Paul9876

  • Junior Community Member
  • Posts: 9
  • Hero Points: 0
Re: How to set settings for multi-line C comments?
« Reply #2 on: May 18, 2016, 08:40:02 pm »
Dan,

That does do almost what I want except for the extra * on the first line. Using '/**' I see this for a multi-line comment:
Code: [Select]
/** this is
 * a multi-line comment
 */

rajkej

  • Senior Community Member
  • Posts: 257
  • Hero Points: 8
Re: How to set settings for multi-line C comments?
« Reply #3 on: May 18, 2016, 09:20:54 pm »
What works for me is shown in the attached screen shots. It might not be exactly what you are looking for but at least it works.

However, for it to work for me I type and must hit return on the very last line to get the '*' on the middle line.

See the 3rd and 4th screen shots. 3rd pict is what I type when I type the returns. 4th pict is after the last line return.