Author Topic: comment wrap quickies  (Read 7321 times)

hs2

  • Senior Community Member
  • Posts: 2737
  • Hero Points: 288
comment wrap quickies
« on: September 20, 2006, 12:38:36 pm »
Comment wrapping is great, but not always ... (at least for me)
Sometimes I just don't want to make use of it and to quickly tell it to Slick I've written a few tiny helper macros.

Maybe it's useful for you too.

HS2

Edit: I'm awfully sorry, but the module was buggy :(
It didn't take care about referred extensions and if comment wrapping is available for the current file extension (class).
-> re-uploaded


« Last Edit: September 26, 2006, 04:30:39 pm by hs2 »

hs2

  • Senior Community Member
  • Posts: 2737
  • Hero Points: 288
Re: comment wrap quickies
« Reply #1 on: September 20, 2006, 03:16:49 pm »
Just as notification: I re-uploaded a fixed version of the module.
See my original edited post for details.

Sorry,
HS2

Edited - 26.09.2006:
I really don't know what's going on - the attached file was crap.
It looked like an interim version while I was still editing the module ...
I re-attached my 'final' version again - sorry again !
« Last Edit: September 26, 2006, 04:36:51 pm by hs2 »

hs2

  • Senior Community Member
  • Posts: 2737
  • Hero Points: 288
Re: comment wrap quickies
« Reply #2 on: September 27, 2006, 08:42:24 am »
Just in case someone really tries to use it.
Sorry again - I must have been completely brain damaged last time... :(
Please see the Edit section in the prev. 'notification' post.

HS2

Dswag89

  • Community Member
  • Posts: 63
  • Hero Points: 4
Re: comment wrap quickies
« Reply #3 on: September 29, 2006, 05:24:12 pm »
SLICKTEAM: POSSIBLE FEATURE REQUEST!!!!
This looks great, but is it possible to take it one step further?  Instead of implementing these macros, I simply bound CTRL+W to comment_wrap_toggle.  This seems to work great.  What would be great would be a status indicator somewhere (either a button that pops in and out) or an indicator in the lower-right-hand-corner (where Line, Col, RW, etc. are) indicating the comment wrap status.  Here's why:  I was editing some code and the associated comment (imagine that... updating the code *AND* comments... AT THE SAME TIME ;) ), the comment looked like this:

Code: [Select]
    /*
    ** Send the data to the 2nd LO PLL Synthesizer
    ** 1. Control Register data
    ** 2. Noise and Spur data
    ** 3. Reference counter data
    ** 4. N Counter data
    */

I went to reorder the comments, so I cut-and-pasted 2. above 1.  Then went to backspace to change the numbering, I ended up with this.

Code: [Select]
    /*
    ** Send the data to the 2nd LO PLL Synthesizer 1. Noise and Spur data
    ** 1. Control Register data 3. Reference counter data
    ** 4. N Counter data
    */

Because good ol' comment wrapping was on (no sarcasm, I really like comment wrapping... when I want it!).  To recover, I had to CTRL-Z (un-do), then CTRL-W (toggle-wrap), then backspace and edit.  If there was a nice indicator showing the status of CW_ENABLE_COMMENT_WRAP, that would ease the flow of comment editing.

Is this possible?

hs2

  • Senior Community Member
  • Posts: 2737
  • Hero Points: 288
Re: comment wrap quickies
« Reply #4 on: September 30, 2006, 10:37:15 am »
Sounds like a good idea !
Maybe it's enough to display the 'global' comment wrap status (similar to the 'REC' field).

@Dswag89: That was the reason for show_cur_comment_wrap().
In fact I bound a shortcut to it so that I can quickly pre-check the status and to toggle the app. flag if needed _before_ bad things happen ...

HS2

Dswag89

  • Community Member
  • Posts: 63
  • Hero Points: 4
Re: comment wrap quickies
« Reply #5 on: October 02, 2006, 12:32:53 pm »
@Dswag89: That was the reason for show_cur_comment_wrap().
In fact I bound a shortcut to it so that I can quickly pre-check the status and to toggle the app. flag if needed _before_ bad things happen ...

Oh yeah, I picked up on that one... like I said, it'd just be great if SE could take it one step further!

JakeMontgomery

  • Community Member
  • Posts: 79
  • Hero Points: 8
Re: comment wrap quickies
« Reply #6 on: November 22, 2006, 08:49:52 pm »
I second (of third) the idea of having a status indicator for comment wrap.  I am somewhat new to SE, and was wondering if there is any way that a user could do that with a macro or adding of some sort?

Dswag89

  • Community Member
  • Posts: 63
  • Hero Points: 4
Re: comment wrap quickies
« Reply #7 on: November 22, 2006, 09:42:00 pm »
HS2 supplied "as good as it gets" functionality... just go back through this thread and find his .e file containing the macros.  He uses show_cur_comment_wrap(), bound to a key, to give himself the current status.