Author Topic: Where are these settings? (SE2008)  (Read 11262 times)

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Where are these settings? (SE2008)
« on: April 03, 2008, 01:36:53 pm »
I've looked through the options and have searched the help but I can't find the settings that govern the following behaviors.  I'm hoping someone can point me in the right direction.

1)  I am having issues with comments in general and multiline comments in particular.  First, when I start a comment block with '/*', SE is auto completing it by adding '*/'.  How can I stop that?  Also, when I press the enter key after starting a comment block, SE auto (un)indents the entire block to the left margin.  I've tried going to "Options -> Languages -> Web Authoring Languages -> PHP -> Comments" and also "Document -> Comment Setup..." (which takes you to the same place) and have messed with the settings there, particularly the 'Location:' settings, but to no avail.  How can I make it so that SE leaves the comment block at the current level of indention?

2) I'm having an issue with if() blocks.  When I start an if() block, SE creates some sort of resizeable box that I can move up or down to move any subsequent code to within the new if().  It also appears to do this with for() and switch() blocks, but not with foreach() blocks.  How can I turn this behavior off?

thnx,
Christoph

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Where are these settings? (SE2008)
« Reply #1 on: April 03, 2008, 06:29:06 pm »
For item #1, you can prevent SlickEdit from completing your comments by setting the def_auto_complete_block_comment variable to 0. Do this as follows:
1) Bring up the SlickEdit command line (press ESC in CUA emulation).
2) Type, "set-var".               // Do not type the quotes
3) When prompted, enter the name of the variable.
4) When prompted, type "0" for the value.          // Do not type the quotes

You should consider leaving this on. It's faster than typing the close characters yourself and you don't have the whole rest of your file commented out while you are typing in the comment. That's why SlickEdit is so agressive about these kinds of behaviors. Properly balanced comments, blocks, etc. are important to allow us to properly color code a file.

SlickEdit has another feature that will automatically expand doc comments. You may want to turn that off, too. That's on the "Comments" node. Uncheck "Automatically expand doc comments".

I can't say why it is unindenting the block comment. We're looking into that now. It might be useful if you could send us a short file that we can reproduce this with.

For item #2, expand the "Indent node" and uncheck "Use Dynamic Surround".

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: Where are these settings? (SE2008)
« Reply #2 on: April 03, 2008, 06:43:13 pm »
I can't say why it is unindenting the block comment. We're looking into that now. It might be useful if you could send us a short file that we can reproduce this with.

Thanks for your reply!  Attached is a sample script (hopefully) illustrating what's going on.

thnx,
Christoph

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Where are these settings? (SE2008)
« Reply #3 on: April 03, 2008, 07:04:20 pm »
Are all of these problems in PHP? It doesn't look we have support in PHP for automatically closing block comments. So, I don't understand how you ran into this, unless it was in another language.

I was able to reproduce the problem with the doc comment. Block comments are fine (using "/*" as opposed to "/**"). We're looking into this now.

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: Where are these settings? (SE2008)
« Reply #4 on: April 03, 2008, 07:12:11 pm »
Are all of these problems in PHP? It doesn't look we have support in PHP for automatically closing block comments. So, I don't understand how you ran into this, unless it was in another language.
I was able to reproduce the problem with the doc comment. Block comments are fine (using "/*" as opposed to "/**"). We're looking into this now.

I've only use SE for PHP so yes, these problem I'm experiencing are in that language.  Attached is my little script updated with a few more examples.

Please note how SE auto formatted the block comment when I just used "/*", paying particular attention to the end of the block.

thnx,
Christoph
« Last Edit: April 03, 2008, 07:16:28 pm by Christoph »

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Where are these settings? (SE2008)
« Reply #5 on: April 03, 2008, 09:12:24 pm »
Can you try running SlickEdit with a default config? The easiest way to do that is to use -sc option on the command line and specify a directory to use, like "vs -sc c:\temp\seconfig". Do you still see the problem with normal block comments /* */?  I am still unable to reproduce that.

Also, please select Document > Select Mode from the main menu. What mode is highlighted? It should be HTML and treating PHP as an embedded language. Have you changed any of the configuration relative to this?


Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: Where are these settings? (SE2008)
« Reply #6 on: April 04, 2008, 12:03:39 pm »
Can you try running SlickEdit with a default config? The easiest way to do that is to use -sc option on the command line and specify a directory to use, like "vs -sc c:\temp\seconfig". Do you still see the problem with normal block comments /* */?  I am still unable to reproduce that.

Also, please select Document > Select Mode from the main menu. What mode is highlighted? It should be HTML and treating PHP as an embedded language. Have you changed any of the configuration relative to this?

Ok, I ran SE using the default config using the command specified above -- "vs.exe -sc c:\temp\seconfig".  But in doing so, I got an error alert saying:

"'C:\Applications\Development\SlickEdit 2008\vslick.sta' is not recognized as a compatible state file or pcode file"

and SE never opened.  Incidentally, trying to run SE from the command line at all (using just vs.exe, no arguments) generates a slew of errors.

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Where are these settings? (SE2008)
« Reply #7 on: April 04, 2008, 08:26:21 pm »
>> 'C:\Applications\Development\SlickEdit 2008\vslick.sta' is not recognized as a compatible state file or pcode file

Sounds like something trashed this file in the installation directory. Can you go to the 'C:\Applications\Development\SlickEdit 2008\' directory , and delete vslick.sta. Then find 'rescue.sta' in that same directory, and copy that file as vslick.sta. That should give you a good clean copy, and try Scott's suggestion of running with the -sc option again.

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: Where are these settings? (SE2008)
« Reply #8 on: April 07, 2008, 12:07:08 pm »
>> 'C:\Applications\Development\SlickEdit 2008\vslick.sta' is not recognized as a compatible state file or pcode file
Sounds like something trashed this file in the installation directory. Can you go to the 'C:\Applications\Development\SlickEdit 2008\' directory , and delete vslick.sta. Then find 'rescue.sta' in that same directory, and copy that file as vslick.sta. That should give you a good clean copy, and try Scott's suggestion of running with the -sc option again.

[C:\Applications\Development\SlickEdit 2008]copy vslick.sta vslick.sta.bak
C:\Applications\Development\SlickEdit 2008\vslick.sta => C:\Applications\Development\SlickEdit 2008\vslick.sta.bak
     1 file copied

[C:\Applications\Development\SlickEdit 2008]copy rescue.sta vslick.sta
C:\Applications\Development\SlickEdit 2008\rescue.sta => C:\Applications\Development\SlickEdit 2008\vslick.sta
     1 file copied

[C:\Applications\Development\SlickEdit 2008]mkdir c:\temp\seconfig

[C:\Applications\Development\SlickEdit 2008]vs.exe -sc c:\temp\seconfig

A dialog then pops up saying

"'c:\Applications\Development\SlickEdit 2008\vslick.sta' is not recognized as a compatible state file or pcode file"

just as before.

I do have VSE9.x installed on this machine but in a completely seperate directory (C:\Applications\Development\vslick) and during the SE2k8 install, it found my old config directory and imported some of my previous settings.  I know it didn't import all of them because once SE2k8 first loaded, I was given a list of a lot of settings it couldn't import (none of which I can remember right now).  I'm not sure if that might be affecting or causing this error.  I'm not entirely sure how it could be as the VSE9.x install is seperate from this install and, as far as I know, is not sharing files.

thnx,
Christoph

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: Where are these settings? (SE2008)
« Reply #9 on: April 08, 2008, 01:17:44 pm »
A dialog then pops up saying

"'c:\Applications\Development\SlickEdit 2008\vslick.sta' is not recognized as a compatible state file or pcode file"

just as before.

Is there anything else I can try?

thnx,
Christoph

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Where are these settings? (SE2008)
« Reply #10 on: April 09, 2008, 01:30:18 pm »
Is the path to the OLD (v9.x) vs.exe in your PATH setting? I'm wondering if maybe the older version was fired off somehow and overwrote that statefile.

Also please try renaming the statefile in the root of the \SlickEdit 2008 folder (like you did before) so that there is no vslick.sta at all to be found. Then restart SE2008, and it'll rebuild the file. If you're on Vista, you'll have to do this with Admin rights (just this one time)

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: Where are these settings? (SE2008)
« Reply #11 on: April 10, 2008, 12:46:33 pm »
Is the path to the OLD (v9.x) vs.exe in your PATH setting? I'm wondering if maybe the older version was fired off somehow and overwrote that statefile.

Also please try renaming the statefile in the root of the \SlickEdit 2008 folder (like you did before) so that there is no vslick.sta at all to be found. Then restart SE2008, and it'll rebuild the file. If you're on Vista, you'll have to do this with Admin rights (just this one time)

Ok, I removed the old VS9.x from my path, moved vslick.sta to vslick.sta.bak and copied rescue.sta to vslick.sta.  I then ran started SE2k8 using

vs.exe -sc c:\temp\seconfig

I opened the beautify.inc file I created in my other thread.  When I tried to create a multi-line comment block, nothing happened.  Apparently this was because .inc was associated with intel assembly.  I changed it to C++ (whereas before I had it associated to PHP) just to see.  When I created my comment block, it worked exactly as it did in VSE9.x.  I started with "/**" and when I pressed enter, the level of indent didn't change and another "*" was added on the next line. 

I then saved that file as beautify.php to try it using the default php comment settings.  When I started with "/**" and pressed enter, the indention didn't change but there wasn't another "*" added on the next line.  I went in to Tools -> Options -> Languages and made sure that the settings for the Comments were the exact same for both C++ and PHP.  Even after making sure they were the same, the behavior didn't seem to change for the file with the .php extension.  I noticed that C++ has an additional setting (that PHP does not have for whatever reason) called "Comment Wrap".  Is it that which is governing this behavior when .inc is associated with C++?

In any case, back to my original settings (not running SE2k8 from the command line as above), I made sure my settings for the PHP language are exactly the same as they are for C++ yet when I start the "/**" block and press enter, it is still forcing the indention of the block all the way to the left margin.  What could be different in my original settings and the (vs.exe -sc c:\temp\seconfig) settings that would be causing this?

thnx,
Christoph

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: Where are these settings? (SE2008)
« Reply #12 on: April 10, 2008, 02:42:27 pm »
Ok, I tried this all over again.  I went in to the directory

c:\temp\seconfig

and deleted the directory 13.0.0; I then restarted SE2k8 using vs.exe -sc c:\temp\seconfig.  Once open, I made only the following changes:

Tools -> Options -> Languages -> Web Authoring Languages -> PHP -> General -> Edit These Extensions...

The only extension set by default was "phpscript".  I then added "php", "inc" and "php3".  When adding "php", I was warned that the extension was already associated with HTML (huh!?!).  When adding "inc", I was warned that the extension was already associated with Intel Assembly.

Making no other changes to the default settings which are used when executing vs.exe with the -sc argument, I edited the attached file.  Please note the "Before" class.  Where the comments show in the "After" class, I placed my cursor on the line immediately above both "public function" and "switch", typed in "/**" and pressed enter.  You will see that the comment block that was created above the switch was moved (automatically by SE2k8) to the left margin.

So it appears that the problem isn't with the configuration my SE2k8 is using normally but instead something that is part of the default settings?  In trying exactly the above but with a file with a cpp extension, the comment blocks behave as I expect; the indention level remains unchanged.  This is the case even though I've made sure that the settings for the comments between both languages are identical.

Hopefully all of this is enough to help you guys figure out how I might be able to address this issue.

thnx,
Christoph

David_O

  • Senior Community Member
  • Posts: 152
  • Hero Points: 8
Re: Where are these settings? (SE2008)
« Reply #13 on: April 10, 2008, 07:51:06 pm »
Thank you.  This helps and I can reproduce the problem well.

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: Where are these settings? (SE2008)
« Reply #14 on: May 01, 2008, 02:24:12 pm »
Thank you.  This helps and I can reproduce the problem well.

Has anything come of this?  Is there a fix I can apply?

thnx,
Christoph