Tidy |
Previous Top Next |
If it finds a syntax problem, Tidy will insert warning comments as shown below and indicate the number of errors found in the lower pane of the editor. In this case the End If is incorrectly spelt and so does not close the If before the Func starts. When the error is fixed, just run Tidy again and all the inserted lines will be removed automatically. If multiple errors are shown, always start by fixing the first one and rerunning Tidy as the subsequent errors may flow from an incorrect structure earlier in the script as in the example shown.
Tidy can be run in several ways:
From within SciTE by pressing Ctrl-T
Run Tidy.exe directly and a dialog will ask for the input file
Right-click on an .au3 file and select Tidy (if the full SciTE4AutoIt3 package has been installed)
/proper or /pr=0/1
/tcb=0 =>only indent the whole commentblock (default)
/tcb or /tcb=1 =>Tidy inside commentblock /tcb=-1 =>leave whole commentbock alone /Skip_CE_Comment or /scec |
[ProgramSettings] #-->Indent 0 = Tabs >0 = Number of Space tabchar=0 #-->Define the TabSize size tabsize=4 #-->Update Functions/Keywords/Macros/UDFs to Proper case proper=1 * * * Update Constants defined in the "constant Include files" properconstants=0 #-->Update Variables to: 1=UpperCase; 2=LowerCase; 3=First Dim/Local/Global or "First_Seen" Case vars=3 #-->Update Spaces around Delimiters delim=1 #-->Add comment to EndFunc statement e.g. "EndFunc ;==>UDF_Name" endfunc_comment=1 #-->Ingnore EndFunc statement comments. #~ endfunc_comment=0 #-->Remove comments from EndFunc statement. #~ endfunc_comment=-1 #-->Add comment to EndRegion and make it the same as the #Region Comments. endregion_comment=1 #-->Add comment to #CE/#CommentEnd and make it the same as the #CS/CommentStart Comments. ce_comment=1 #--> Tidy commentblock 0=only indent the whole commentblock (default=0) # 1=Tidy inside commentblock # -1=leave whole commentbock alone Tidy_commentblock=0 #-->Ignore EndFunc statement comments. #~ endregion_comment=0 #-->Remove comments from EndFunc statement. #~ endregion_comment=-1 #-->Indent #region sections region_indent=0 #-->Define the default column for inline comments, 0=keep current position ilc_pos=0 #-->Generate Documentation file for the Program and optionally Display it with Notepad at the end ot the Tidy run Gen_Doc=0 Gen_Doc_Show=0 #--> Keep x Version of the File before the Tidy run and optionally store them in SubDirectory "\Backup" KeepNVersions=5 #--> Target backup directory which defaults to Scriptdir\Backup. Any other directory needs to exist or else it will use the default directory! backupDir= #--> Remove Empty lines from Script Source Remove_Empty_Lines= #--> 1=Show Tidy Errors in Console 9=Debug Output ShowConsoleInfo= #--> Run DIFF program at the end of the Tidy run to show the difference between original and new program. #~ ShowDiffPgm=C:\Progra~1\WinMerge\winmerge.exe "%new%" "%old%" #--> End With NewLine: 0=Strip Lastline CRLF; 1=Always end with CRLF (Default) End_With_NewLine=1 |