Author Topic: Invisible table?  (Read 8024 times)

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Invisible table?
« on: September 25, 2007, 06:02:28 PM »
Really weird one this. I have some comment, part of which looks like this:

Code: [Select]
//
// Author:  me
// Date:
//

There's a tab between Author: and me. I'm going to enter todays date so I position at the end of Date: and hit tab then start typing September. However, I only get to 'Se' before some auto-something takes over and makes it look like this:

Code: [Select]
//
// Author:  me
// Date:
// September
//

You wouldn't believe how hard it is to get this entered correctly! The Date: line is OK until I get to the same column as the end of the Author: line, so something is plainly lining up.

evanratt

  • Senior Community Member
  • Posts: 300
  • Hero Points: 23
Re: Invisible table?
« Reply #1 on: September 25, 2007, 06:44:01 PM »
Sounds like you have comment wrap enabled. Go to Tools->Options->File Extension Setup->Comment Wrap tab and disable comment wrapping. I've got a macro installed that I picked up in these forums (I think it was posted by hs2) that's really great; it lets you bind a comment wrap toggle command to a key, so when I know I'm going to be writing a long comment I can just hit Ctrl-Alt-W to enable comment wrapping, and then hit it again to disable it... Definitely worth a look.

-Evan

Edit: Here's a link to the thread with the macro (thanks again, hs2!):
http://community.slickedit.com/index.php?topic=452.0
« Last Edit: September 25, 2007, 06:46:44 PM by evanratt »

David_O

  • Senior Community Member
  • Posts: 152
  • Hero Points: 8
Re: Invisible table?
« Reply #2 on: September 25, 2007, 06:47:39 PM »
Most likey cause is that in your comment wrap settings you have on the option to 'Preserve width on existing comments' or else you are using the Automatic width for your comment wrap method.  In either of these cases, comment wrapping will try to preserve the width of the comment (unless you've just created the whole thing from scratch.)  In your case, you have neither blank lines between "Author: " and "Date: " nor special tags (e.g. @param) starting the lines to make it clear that these are separate paragraphs, so it assumes that this is a very narrow three line paragraph and wraps to keep it narrow.

You can first try to turn off 'Preserve width on existing comments' by going to Tools -> Options -> File Extension Setup.  Click the Comment Wrap tab and uncheck the 'Preserve width on existing comments' checkbox.  (Or type 'comment-wrap-preserve-width N' on the command line.)

If that is already unchecked or you still do not like the results, then, on the same Comment Wrap tab in File Extension Setup, in the Comment width panel, select either Fixed width or Fixed right margin.  This should give you a more predictable wrapping style.

If this still does not satisfy you, then disable the feature.  Uncheck 'Coment Wrap' in the Document menu.  Or uncheck 'Enable comment wrap' in File Extension setup.  Or at command line type 'comment-wrap N'.



« Last Edit: September 25, 2007, 06:54:37 PM by David_O »

David_O

  • Senior Community Member
  • Posts: 152
  • Hero Points: 8
Re: Invisible table?
« Reply #3 on: September 25, 2007, 06:51:55 PM »
SlickEdit already does have a command 'comment-wrap-toggle' that you can bind to a key to quickly turn on and off the feature.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Invisible table?
« Reply #4 on: September 25, 2007, 07:10:55 PM »
Wow! Obvious to everyone except me :)

Thanks for the pointers, both (and hs2 by proxy). I had everything turned on, so that's an easy fix. On the other hand, I do like comment wrapping when it's appropriate and miss it when I use notepad++ for quick edits. A combination of the SE brute toggle plus hs2's short commands for status and fine turning looks like the way to go until I figure out what's important to me.

You know, once upon a time I used to laugh at those Wordpervert users who had big keybind charts stuck to their keyboards...

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Invisible table?
« Reply #5 on: September 25, 2007, 07:35:01 PM »
Invisible table?

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Invisible table?
« Reply #6 on: September 25, 2007, 11:19:40 PM »
:D Your cat Ryan ?

Perhaps another submenu entry 'Comment wrap' in the default context menu (maybe only active when in comment) would be helpful (and save some keybindings).
Just containing a few direct settings and 'Options' activating the corr. file ext. settings dialog (tab).
HS2

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Invisible table?
« Reply #7 on: September 26, 2007, 01:16:54 AM »
Oh, so that's how cats creep up on mice  ;D

That would be a good idea, hs2, except that the I don't really want to be groping for the mouse when mid-comment. Maybe if Ctl-W would cycle through the possibilities, or a useful subset, that would be really cool (but, obviously, it would have to show the setting like your scw function).

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Invisible table?
« Reply #8 on: September 26, 2007, 11:36:21 AM »
@dunkers: Due to lacking keybindings I've added 1 more (A-S-+, but you can easily change it) for 'context-menu'. In fact I'm using my own version (usr-context-menu) of it which displays it besides the text-cursor (or selected item for TBs) for obvious reasons. It also works for toolbars etc.
I've extracted it from my toolbox in case you're interested in it.
Edit: The module also contains 2 more 'derived' commands for the 'Tools>Options' and 'Version control' menus.

HS2
« Last Edit: September 26, 2007, 11:54:23 AM by hs2 »

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Invisible table?
« Reply #9 on: September 26, 2007, 01:11:24 PM »
Thanks, hs2. Er... but I couldn't get it to do anything. I loaded it and tried calling the functions, changing to #if 1, etc. I'm probably being a little bit dense (only had one coffee this morning).

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Invisible table?
« Reply #10 on: September 26, 2007, 01:28:56 PM »
Hmm - shouldn't be problem to call it. Even w/o the add. event handlers it should be possible to just invoke it (usr-context-menu) on cmdline. The other 2 commands (usr-config/vc-menu) needs to be bound to keys. When called from cmdine they imm. disappear. Let me now if the problem still persists after your 2nd coffee ;)
HS2