Jump to content

Tidy - full description of options


Recommended Posts

Where can I find a full description of Tidy options, such as the ones in a Tidy.ini file?

In SciTE --> Tools --> Compile --> Tidy tab:

Possible Parameters: 
   /tc n  : 0=Tab >0=Number of Spaces.
   /gd    : Generate documentation file.
   /rel   : Remove empty lines from the source.
   /sci 0 : Default Minimal output to the console: warning and errors.
   /sci 1 : Show more progress information. 
   /sci 9 : Show all debug lines as found in the Obfuscator.log.
   /gds   : Show generated doc file in Notepad.
   /sdp x : Specify Diffprogram to use eg: 
            /sdp C:\Progra~1\WinMerge\winmerge.exe "%new%" "%old%"
   /nsdp  : Don't run program as specified by /sdp.
   /kv n  : n = number of backcopies to keep. 0 = all
   /bdir x: x = Target backup directory.
   /sf    : Sort all Func-Endfunc Blocks in sequence FuncName.
            When #Region-#EndRegion is used sort them within that scope.
   /sfc   : Same as /sf but first sorts on Comment at the end of the Func() statement
Link to comment
Share on other sites

  • Developers

I keep on wondering why I made that helpfile :)

Ctrl+F1 in SciTE: Extra utilities/Tidy

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I keep on wondering why I made that helpfile :)

Ctrl+F1 in SciTE: Extra utilities/Tidy

Jos

I saw the help file, but still had some questions. For example, what are the allowed values for the "delim" option?

Should "/Remove_EndFun_comment" be "/Remove_EndFunc_comment" ?

I also tried to disable the "Update Spaces around delimiters" for a few lines in a script by using:

#Tidy_Parameters= /delim=0

;..lines where I want to leave spacing alone

#Tidy_Parameters= /delim=1

but this did not work. Is there a way to do this for selected lines?

Thanks,

Frank

Frank

Link to comment
Share on other sites

  • 1 year later...

I also tried to disable the "Update Spaces around delimiters" for a few lines in a script by using:

#Tidy_Parameters= /delim=0

;..lines where I want to leave spacing alone

#Tidy_Parameters= /delim=1

but this did not work. Is there a way to do this for selected lines?

Sorry for bumping an old thread, but I would also like to know if there's a solution to this.

Has it been answered somewhere else or did the OP found a way to suppress Tidy for a number of lines?

Link to comment
Share on other sites

ineedh3lp:

Nope. Tidy detectives are not location sensitive. Or: They are read(all) before starting the Tidy process. And are ignored while the tidy process is in progress.

Blue_Drache:

:graduated: what?

There are no special tidy options related to compiling. There is only the '#AutoIt3Wrapper_Run_Tidy=Y' directive to make tidy run on your source automatically when compiling(or building) your executable. (and when just running your code to.)

Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

OK, but can you suggest a way of aligning lines without having them rearranged by Tidy?

For example, if I want the '=' symbol on the same column, I'm currently doing this:

Global $______, $STR_ResLogObject = "---Object.........: "
Global $________, $STR_ResLogName = "---Name...........: "
Global $________, $STR_ResLogSize = "---Size...........: "

Global $______, $STR_ResLogOrigin = "---Origin.........: "
Global $______, $STR_ResLogVolume = "---Volume.........: "
Global $________, $STR_ResLogType = "---Type...........: "
Global $___, $STR_ResLogWinSerial = "---Win Serial.....: "
Global $____, $STR_ResLogFullPath = "---Full Path......: "

Global $_____, $STR_ResLogAttribs = "---Attributes.....: "

Global $_____, $STR_ResLogCreated = "---Created........: "
Global $____, $STR_ResLogModified = "---Modified.......: "
Global $_____, $STR_ResLogAcessed = "---Accessed.......: "
Edited by ineedh3lp
Link to comment
Share on other sites

  • Developers

Try:

#Tidy_Parameters=/delim=0

... but there is currently no option to skip a block of code from being processed by Tidy.

Maybe nice option for the next release?

#Tidy_Off ;Stop the Tidy process below this line

#Tidy_On ;Start the Tidy process below this line

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Try:

#Tidy_Parameters=/delim=0

... but there is currently no option to skip a block of code from being processed by Tidy.

Maybe nice option for the next release?

Issue is I want only certain areas of code not to be touched by Tidy. I really like Tidy, but it would be more useful if it could be instructed to ignore defined areas.

Ah, sorry, I didn't see your latest edit.

Edited by ineedh3lp
Link to comment
Share on other sites

  • Moderators

Jos,

#Tidy_Off ;Stop the Tidy process below this line

#Tidy_On ;Start the Tidy process below this line

Ja alstublieft! :graduated:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

Give the current Tidy in the Beta downloads a spin and see if that does what it should do for you.

These Keywords are now supported:

#Tidy_Off ;Stop the Tidy process below this line

#Tidy_On ;Start the Tidy process below this line

included an update for autoit3wrapper.keywords.properties and au3.autoit3wrapper.api, but are not needed for Tidy to work.

I Obviously not had much time to do any testing so make sure you keep a good copy of your code when testing this version.

@Melba_23, This is what siesta's are good for... of to get some nice Gelato :graduated:

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Blue_Drache:

:graduated: what?

There are no special tidy options related to compiling. There is only the '#AutoIt3Wrapper_Run_Tidy=Y' directive to make tidy run on your source automatically when compiling(or building) your executable. (and when just running your code to.)

I don't have an example handy, but I do at the house. Will post it later.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Replaced Tidy.exe with the new one

au3.autoit3wrapper.api to C:\Program Files (x86)\AutoIt3\SciTE\api\au3.autoit3wrapper.api

au3.properties to C:\Program Files (x86)\AutoIt3\SciTE\Properties\au3.properties

and

autoit3wrapper.keywords.properties to C:\Program Files (x86)\AutoIt3\SciTE\Properties\autoit3wrapper.keywords.propertie

Keywords are recognized and Tidy works as expected. Will surely use these new properties a lot so I'll report if I find any bugs.

Thank you, Jos!

Edited by ineedh3lp
Link to comment
Share on other sites

  • Moderators

Jos,

Sorry to rain on your Gelato, but.....try running the new Tidy on this: :graduated:

#region
 
    $fred = 1
    If $fred Then
        #Tidy_Off
        $tom   = 1
        $dick  = 1
        $harry = 1
        #Tidy_On
    EndIf
 
#endregion

I get this:

#region
 
    $fred = 1
    If $fred Then
        #Tidy_Off
                $tom   = 1
                $dick  = 1
                $harry = 1
         #Tidy_On
    EndIf
 
#endregion

It must be a #region thing - I do have region_indent = 1 set, but if I delete it I get this:

#region
 
$fred = 1
If $fred Then
    #Tidy_Off
            $tom   = 1
            $dick  = 1
            $harry = 1
     #Tidy_On
EndIf
 
#endregion

Enjoy the siesta - or should I say "pisolino" given where you are at the moment? ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

If you run Tidy multiple times on this:

#region
 
    $fred = 1
    If $fred Then
        #Tidy_Off
        $tom   = 1
        $dick  = 1
        $harry = 1
        #Tidy_On
    EndIf
 
#endregion

It will tab tom, dick and harry forward after each run.

Also, when trying to compile a script containing the new keywords, I get these messages: Invalid AutoIt3Wrapper Directive. How can I get rid of them?

Do they have to be defined in C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\Directives.au3 or what?

Oh, I probably have to add them to C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3 and recompile it.

Edited by ineedh3lp
Link to comment
Share on other sites

  • Developers

I knew you guys would find something wrong here.

Uploaded an update to the Beta dir for you to test what I messed up this time. :graduated:

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Also, when trying to compile a script containing the new keywords, I get these messages: Invalid AutoIt3Wrapper Directive. How can I get rid of them?

Do they have to be defined in C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\Directives.au3 or what?

Oh, I probably have to add them to C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3 and recompile it.

Will upload a version of AutoIt3Wrapper that will avoid this warning in a few minutes.

Edit: Done..

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

Jos,

New Tidy seems to work fine. Thanks for the quick fix. :graduated:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thank you for adding this feature to Tidy.

Here's a different circumstance in which Tidy's Off/On doesn't works as expected (or at least how I expect it to work)

Let's say we have the following:

#Tidy_Off
Local $HelpStr = _
        "AAA" & _
        "BBB" & _
        "CCC"
#Tidy_On

No problem with that,

but if I move #Tidy_Off after a continued line:

Local $HelpStr = _
        #Tidy_Off
        "AAA" & _
        "BBB" & _
        "CCC"
#Tidy_On

I get this after tidying:

Local $HelpStr = _
        #Tidy_Off
"AAA" & _
        "BBB" & _
        "CCC"
#Tidy_On

It seems to remove all spaces and tabs before script on the first line under Tidy Off. Now this isn't a a major issue- just thought I should mention.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...