Author Topic: How do I get comment wrap to work correctly  (Read 3459 times)

greggman

  • Senior Community Member
  • Posts: 279
  • Hero Points: 14
How do I get comment wrap to work correctly
« on: June 19, 2012, 09:45:43 pm »
I've been meaning to ask this forever but....

What should my settings for comment wrap be for it to limit wrapping to 80 columns?  I have word wrap set to 80 columns and code gets wrapped (or rather lines get line broken if they hit 80 columns) but comments often go paste 80 columns and wrap a few characters past. Is there a setting I need to set?

See example here:
http://www.youtube.com/watch?v=ojhlfTzwDZM

Sorry about the strange colors. Something about youtube not completely understanding the format of the video I uploaded.
« Last Edit: June 20, 2012, 05:49:40 am by greggman »

Phil Barila

  • Senior Community Member
  • Posts: 742
  • Hero Points: 61
Re: How does comment wrap work?
« Reply #1 on: June 19, 2012, 09:51:55 pm »
For those languages that have it, you want "Comment Wrap", not "Word Wrap".  Not all languages have it.  In v17, "Comment Wrap" is between "Comments" and "Word Wrap" in the language settings for those languages that have it.

greggman

  • Senior Community Member
  • Posts: 279
  • Hero Points: 14
Re: How does comment wrap work?
« Reply #2 on: June 20, 2012, 05:47:11 am »
this is comment wrap  ???

watch the video. I'm in a comment. Words get wrapped to next comment line (in other words they're inserted in the comment)  If it was just word wrap it wouldn't insert the word after the // at the beginning of the line.
« Last Edit: June 20, 2012, 05:48:49 am by greggman »

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: How do I get comment wrap to work correctly
« Reply #3 on: June 20, 2012, 06:44:21 am »
Let's back up a step.
Specifically which setting, where, is set to 80?

You said "word wrap" is set to 80 columns.
... I have word wrap set to 80 columns ...

The "word wrap" setting won't affect the "comment wrap" feature, which is why Phil suggested setting "comment wrap" rather than setting "word wrap".

Graeme

  • Senior Community Member
  • Posts: 2470
  • Hero Points: 325
Re: How do I get comment wrap to work correctly
« Reply #4 on: June 20, 2012, 07:09:48 am »
Have you counted the characters carefully.  I count 78 characters  up to the vertical line ??

When you say code gets wrapped if it goes past 80 columns, does that mean you never see code past the vertical line?

As the other guys said, the word wrap (code) settings are separate from comment wrap settings.

[Edit] now I get 80!
« Last Edit: June 20, 2012, 07:13:01 am by Graeme »

greggman

  • Senior Community Member
  • Posts: 279
  • Hero Points: 14
Re: How do I get comment wrap to work correctly
« Reply #5 on: June 20, 2012, 07:43:45 am »
Have you counted the characters carefully.  I count 78 characters  up to the vertical line ??

When you say code gets wrapped if it goes past 80 columns, does that mean you never see code past the vertical line?

Yes, code gets wrapped at 80, comments do not. You can see the "wrap line" that slickedit draws in the video.  Code lines get wrapped there, comment lines do not, they get wrapped a few characters past it.


Graeme

  • Senior Community Member
  • Posts: 2470
  • Hero Points: 325
Re: How do I get comment wrap to work correctly
« Reply #6 on: June 20, 2012, 08:10:59 am »
ok, but what are your comment wrap settings?  Mine are attached and seem to wrap correctly at col 80  - using V16.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: How do I get comment wrap to work correctly
« Reply #7 on: June 20, 2012, 04:46:09 pm »
I counted 80 characters to the "vertical line" (note it's not a "wrap line", it has nothing to do with wrapping, it's a completely separate arbitrary vertical line column).
I counted 82 characters to the point where it's wrapping the comment.

Important -- There are completely separate settings for the "comment wrap" feature.  You keep saying you set the "word wrap" column.  But that wouldn't affect your situation at all.  Please read my previous post.  Please look for literally the "comment wrap" settings.

What are your "word wrap" settings?
And separately and more importantly, what are your "comment wrap" settings?

greggman

  • Senior Community Member
  • Posts: 279
  • Hero Points: 14
Re: How do I get comment wrap to work correctly
« Reply #8 on: June 20, 2012, 06:15:19 pm »
Got it. Thanks. That was it.