Sign in to follow this  
Followers 0
rmarkables

Syntax Folding by the SciTE Editor

10 posts in this topic

Hi,

I have a script over 6000 lines, so I use the Syntax Folding feature of the SciTE editor constantly. Something changed with the latest verion of AutoIt or the editor which causes the script to "unfold" every time I compile.

Is there a setting to control this reaction?

Or perhaps a setting to automaticcally refold the script?

Any hints of tips will be greatly appreciated.

Thanks

Mark

Share this post


Link to post
Share on other sites



I'm not sure on the solution to this one, for Jos is the guru when it comes to SciTe. One work around is to divide your code up into sections, and have each section as a separate file. Have a master script, and use #include to put the pieces together. This way it makes it more manageable. SOme of my scripts are over 10,000 lines, so I went to this to make it easier to manage the thing.

Share this post


Link to post
Share on other sites

These are my fold options. In the Scite menu: "Options" -> "Open User Options File", paste them in and save, and then see if it helps.

# Folding
# enable folding, and show lines below when collapsed.
fold=1
fold.compact=1
fold.flags=16
fold.symbols=2
fold.on.open=1
fold.comment=1
fold.preprocessor=1

:)

Share this post


Link to post
Share on other sites

Hi,

I have a script over 6000 lines, so I use the Syntax Folding feature of the SciTE editor constantly. Something changed with the latest verion of AutoIt or the editor which causes the script to "unfold" every time I compile.

Is there a setting to control this reaction?

Or perhaps a setting to automaticcally refold the script?

Any hints of tips will be greatly appreciated.

Thanks

Mark

Mark,

I just tried on a smaller script but pressing F7 doesn't unfold.

How can i replicate the behavior you get ?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

It may be that parts of the script are being changed by Tidy.

Share this post


Link to post
Share on other sites

It may be that parts of the script are being changed by Tidy.

Thanks to all for your responses.

The folding code in the User Options file had no effect.

I had noticed Tidy did unfold the code when run, but I am not running Tidy on every build. I did notice when I upgrade the AutoIt and SciTE the INI files were now included into the code. These are the new directives:

CODE
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****

#AutoIt3Wrapper_icon=C:\Documents and Settings\Mark_Ables\My Documents\My Pictures\ICONS\filetype3.ico

#AutoIt3Wrapper_outfile=C:\data\Apps\AutoIt3\_Mark's_Stuff\eSupport_Coordinator_V2.0.exe

#AutoIt3Wrapper_UseUpx=n

#AutoIt3Wrapper_Res_Description=AutoIt v3 Compiled Script

#AutoIt3Wrapper_Res_Fileversion=2.0.0.209

#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y

#AutoIt3Wrapper_Res_LegalCopyright=A Mark Ables

#AutoIt3Wrapper_Res_Language=1033

#AutoIt3Wrapper_Res_Field=Owner|BFH Analyst

#AutoIt3Wrapper_Run_AU3Check=n

#AutoIt3Wrapper_AU3Check_Parameters=-q

#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

Thanks

Mark

Share this post


Link to post
Share on other sites

I'm not sure on the solution to this one, for Jos is the guru when it comes to SciTe. One work around is to divide your code up into sections, and have each section as a separate file. Have a master script, and use #include to put the pieces together. This way it makes it more manageable. SOme of my scripts are over 10,000 lines, so I went to this to make it easier to manage the thing.

Hi Volly,

I had the code arranged into separate files at one time, but during my learning curve, for some reason I thought it would be better to have them in one file.

BTW, I feel like I am still very early in my learning curve, but I know I would not be near as far along if it were not for this forum and it's very helpful contributors.

Thanks for your help.

Mark

Share this post


Link to post
Share on other sites

Mark,

I just tried on a smaller script but pressing F7 doesn't unfold.

How can i replicate the behavior you get ?

Jos

Hi Jos,

I am running SciTE version 1.75, Nov 22 2007 15:38:26 by Neil Hodgson and AutoIt version v3.2.10.0 with no customization, except attempting the fold options suggested by MHz. I also post the Directives created by AutoIt3Wrapper_GUI earlier in this thread.

Thanks for any suggestions.

Mark

Share this post


Link to post
Share on other sites

Mark,

This line:

#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y

will trigger a fileupdate thus a reload of the file which in turn will expand all folds.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Mark,

This line:

#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y

will trigger a fileupdate thus a reload of the file which in turn will expand all folds.

Jos

Hi Jos,

Thank you very much for your advice. This has resolved my (current) issue in a flash !!

Mark

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0