Difference between revisions of "SciTE4AutoIt3"

From AutoIt Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
SciTE4AutoIt3 is a specialist editor package based around the excellent [http://www.scintilla.org/SciTE.html SciTE] editor.  The editor has been set up to compile AutoIt scripts.  SciTE has been extended with a multitude of lua scripts.  SciTE4AutoIt3 may be downloaded here: [http://www.autoitscript.com/site/autoit-script-editor/ SciTE4AutoIt3]
 
SciTE4AutoIt3 is a specialist editor package based around the excellent [http://www.scintilla.org/SciTE.html SciTE] editor.  The editor has been set up to compile AutoIt scripts.  SciTE has been extended with a multitude of lua scripts.  SciTE4AutoIt3 may be downloaded here: [http://www.autoitscript.com/site/autoit-script-editor/ SciTE4AutoIt3]
  
==Feature Notes==
+
SciTE4AutoIt3 comes with an array of tools and advanced options including a configuration program named "SciTE Config" under the "tools" menu.  With ''SciTE Config'' a user may change the color scheme of SciTE's syntax highlighting, change the default Au3 script file double-click action, create a script backup policy and determine what tools are shown in SciTE's tools menu.  Also available are calltips, abbreviations, and quick access to the helpfiles.
SciTE4AutoIt3 comes with an array of tools and advanced options including a configuration program named "SciTE Config" under the "tools" menu.  With SciTEConfig a user may change the color scheme of SciTE's syntax highlighting, change the default Au3 script file double-click action, create a script backup policy and determine what tools are shown in SciTE's tools menu.  Also available are calltips, abbreviations, and quick access to the helpfile. To access the helpfile the user may press Alt + F1. To quickly access help information on a specific function/statement, simply click/highlight the function/statement in question and press the F1 key to bring up the help file on a relevant page.
+
 
 +
 
 +
==SciTE Quick Tips==
 +
 
 +
To access the helpfile the user may press [Alt] + [F1].  
 +
To quickly access help information on a specific function/statement, simply click/highlight the function/statement in question and press the [F1] key to bring up the help file on a relevant page.
 +
 
 +
For SciTE related help, use the key combination [Ctrl] + [F1] to bring up a help file detailing SciTE related help documentation. ''It's recommended you read it.''
 +
 
 +
For anyone not familiar with SciTE, here are a few tips and tricks to help you easily modify the installation to suit your needs. For any "truly" advanced info, you should visit the [[http://www.scintilla.org/SciTEDoc.html SciTE home page]].
 +
 
 +
With the information below, you will be doing some minor editing to SciTEs configuration files.
 +
It is imperative that you know the hierarchy of SciTEs configuration files. The main files we will be dealing with here are listed below.
 +
 
 +
Remember there are four properties files used:
 +
 
 +
# ''SciTE.properties''
 +
# ''SciTEDirectory.properties''
 +
# ''SciTEUser.properties''
 +
# ''SciTEGlobal.properties''
 +
 
 +
 
 +
<table border="1">
 +
<tr><td>SciTE.properties</td><td>Local properties file which may be present in the same directory as the file being edited. This file overrides any other properties files settings below. This file is user created.</td></tr>
 +
<tr><td>SciTEDirectory.properties</td><td>Directory properties file which may be present in the same or in a parent directory as the file being edited. This file overrides all properties setting of the files below, but not the local properties settings aka ''SciTE.properties''. This file is user created.</td></tr>
 +
<tr><td>SciTEUser.properties</td><td>User properties file, this files settings override only the Global properties settings aka ''SciTEGlobal.properties''. This file is found under the current logged on users profile directory.</td></tr>
 +
<tr><td>SciTEGlobal.properties</td><td>All settings in this file can be overridden by any of the above files. Typically you shouldn't mess with this file and use any of the above methods to implement a setting change. This file can be found in SciTE's installation directory.</td></tr>
 +
</table>
 +
 
 +
''If you're having any trouble finding any of the previously mentioned files, I recommend you NOT continue with this information...''
 +
 
 +
 
 +
===Inline Errors===
 +
[[File:InlineError.JPG‎‎|200px|thumb|right|Intentional error prone code used to display the "Inline Error" feature.]]
 +
In the latest version of SciTE, there exists a new feature called "Inline Errors", some users find them annoying. Inline Error marks are error messages that will appear in the source code within the Scintilla window. While helpful, some users prefer to disable this feature often for unknown reasons.
 +
You can quickly disable/enable them using the '''SciTEUser.properties'''.
 +
 
 +
 
 +
Open the SciTE user properties file in a text editor and add the following code to the file.
 +
 
 +
To disable Inline Errors, add the following.
 +
<syntaxhighlight lang="properties">
 +
# Display settings for inline errors on the source
 +
error.inline=0
 +
</syntaxhighlight>
 +
To enable Inline Errors, add the following.
 +
 
 +
<syntaxhighlight lang="properties">
 +
# Display settings for inline errors on the source
 +
error.inline=1
 +
</syntaxhighlight>
 +
 
 +
===Selection Highlighting===
 +
In the latest SciTEforAutoIt3, there is a new feature which highlights other instances of the highlighted word or string. Due to the colors, sometimes it's hard to tell the selection apart.
 +
 
 +
If you'd like, you can do either of two things using the ''SciTEUser.properties''.
 +
# Disable it
 +
# Change the color scheme
 +
 
 +
To disable it
 +
<syntaxhighlight lang="properties">
 +
highlight.current.word=0
 +
</syntaxhighlight>
 +
To re-enable it, just delete it and save.
 +
 
 +
To change the color scheme, add the following to your SciTEUser properties file.
 +
<syntaxhighlight lang="properties">
 +
highlight.current.word.colour=#000040
 +
selection.alpha=50
 +
selection.back=#F025A8
 +
</syntaxhighlight>
 +
 
 +
Try adjusting the ''#COLOR'' values to get an effect you'd prefer.
 +
 
 +
===More Language Highlighting Options===
 +
 
 +
In the SciTEUser.properties file, add the following code.
 +
 
 +
 
 +
<syntaxhighlight lang="properties">
 +
# Language Highlighting Options
 +
menu.language=\
 +
#FreeBasic|bas||\
 +
Text|txt|Shift+F11|\
 +
#Ada|ads||\
 +
AutoIt3|au3|Shift+F12|\
 +
#Apache Confi&g|conf||\
 +
#Assembler|asm||\
 +
#ASN.1|asn1||\
 +
#Avenue|ave||\
 +
#Baan|bc||\
 +
#&Batch|bat||\
 +
#Bullant|ant||\
 +
#&C / C++|cpp||\
 +
#CMake|cmake||\
 +
#C&#|cs||\
 +
#COBOL|cob||\
 +
#Csound|orc||\
 +
#CSS|css||\
 +
#D|d||\
 +
#&Difference|diff||\
 +
#&Eiffel|e||\
 +
#Erlang|erl||\
 +
#&Errorlist|err||\
 +
#FlagShip|prg||\
 +
#&Fortran|f90||\
 +
#&Fortran|f90||\
 +
#Gap|g||\
 +
#Haskell|hs||\
 +
#H&ypertext|html|$(keyHTML)|\
 +
#&InnoSetup|iss||\
 +
#&Java|java||\
 +
#Java&Script|js||\
 +
#&Kix|kix||\
 +
#Lisp|lisp||\
 +
#Lot|lot||\
 +
#Lout|lt||\
 +
#Lu&a|lua||\
 +
#Matlab|m.matlab||\
 +
#&Makefile|mak||\
 +
#MetaPost|mp||\
 +
#MMIXAL|mms||\
 +
#Modula-3|m3||\
 +
#&nnCron crontab|tab||\
 +
#NSIS|nsis||\
 +
#Objective Caml|ml||\
 +
#Octave|m.octave||\
 +
#Opal|impl||\
 +
#Pascal|pas||\
 +
#Pe&rl|pl||\
 +
#P&HP|php||\
 +
#P&LSQL|spec||\
 +
#P&ostScript|ps||\
 +
#P&OV-Ray SDL|pov||\
 +
#PowerShell|ps1||\
 +
#PowerPro|powerpro||\
 +
#&Properties|properties||\
 +
#Pytho&n|py||\
 +
#R|R||\
 +
#Reso&urce|rc||\
 +
#Ruby|rb||\
 +
#Shell|sh||\
 +
#S&QL|sql||\
 +
#Specman|e||\
 +
#&TCL|tcl||\
 +
#TeX|tex||\
 +
#&txt2tags|t2t||\
 +
#&VB|vb||\
 +
#VBScr&ipt|vbs||\
 +
#Verilog|v||\
 +
#VHDL|vhd||\
 +
#&XML|xml||\
 +
#&YAML|yaml||
 +
</syntaxhighlight>
 +
 
 +
For whatever language you wish to have an option appear under the ''Language'' menu option, uncomment the language.
 +
 
 +
Say you want to SciTE to give you the option to highlight batch script code, change the following string in the above list from
 +
 
 +
<syntaxhighlight lang="properties">
 +
#&Batch|bat||\
 +
</syntaxhighlight>
 +
to
 +
<syntaxhighlight lang="properties">
 +
&Batch|bat||\
 +
</syntaxhighlight>
 +
Restart SciTE and if done correctly, the option should be present!
 +
Do this for any language listed in the above example list.
 +
 
 +
In the case that you uncommented a language and you notice that it's not being highlighted correctly, then we will have to edit some things in the '''SciTEGlobal.properties''' file.
 +
 
 +
Open the '''SciTEGlobal.properties''' file in a text editor and find the section
 +
 
 +
<syntaxhighlight lang="properties">
 +
# import properties\all the language specific properties files
 +
</syntaxhighlight>
 +
Below that section there will be a few strings that look like
 +
<syntaxhighlight lang="properties">
 +
#import properties\[syntax]
 +
 
 +
</syntaxhighlight>
 +
Uncomment the syntax related property you wish to have support for.
 +
 
 +
Say you wanted support for ruby, just locate the one that says ''ruby'' where ''[syntax]'' is written.

Revision as of 07:42, 9 November 2012

SciTE4AutoIt3 is a specialist editor package based around the excellent SciTE editor. The editor has been set up to compile AutoIt scripts. SciTE has been extended with a multitude of lua scripts. SciTE4AutoIt3 may be downloaded here: SciTE4AutoIt3

SciTE4AutoIt3 comes with an array of tools and advanced options including a configuration program named "SciTE Config" under the "tools" menu. With SciTE Config a user may change the color scheme of SciTE's syntax highlighting, change the default Au3 script file double-click action, create a script backup policy and determine what tools are shown in SciTE's tools menu. Also available are calltips, abbreviations, and quick access to the helpfiles.


SciTE Quick Tips

To access the helpfile the user may press [Alt] + [F1]. To quickly access help information on a specific function/statement, simply click/highlight the function/statement in question and press the [F1] key to bring up the help file on a relevant page.

For SciTE related help, use the key combination [Ctrl] + [F1] to bring up a help file detailing SciTE related help documentation. It's recommended you read it.

For anyone not familiar with SciTE, here are a few tips and tricks to help you easily modify the installation to suit your needs. For any "truly" advanced info, you should visit the [SciTE home page].

With the information below, you will be doing some minor editing to SciTEs configuration files. It is imperative that you know the hierarchy of SciTEs configuration files. The main files we will be dealing with here are listed below.

Remember there are four properties files used:

  1. SciTE.properties
  2. SciTEDirectory.properties
  3. SciTEUser.properties
  4. SciTEGlobal.properties


SciTE.propertiesLocal properties file which may be present in the same directory as the file being edited. This file overrides any other properties files settings below. This file is user created.
SciTEDirectory.propertiesDirectory properties file which may be present in the same or in a parent directory as the file being edited. This file overrides all properties setting of the files below, but not the local properties settings aka SciTE.properties. This file is user created.
SciTEUser.propertiesUser properties file, this files settings override only the Global properties settings aka SciTEGlobal.properties. This file is found under the current logged on users profile directory.
SciTEGlobal.propertiesAll settings in this file can be overridden by any of the above files. Typically you shouldn't mess with this file and use any of the above methods to implement a setting change. This file can be found in SciTE's installation directory.

If you're having any trouble finding any of the previously mentioned files, I recommend you NOT continue with this information...


Inline Errors

Intentional error prone code used to display the "Inline Error" feature.

In the latest version of SciTE, there exists a new feature called "Inline Errors", some users find them annoying. Inline Error marks are error messages that will appear in the source code within the Scintilla window. While helpful, some users prefer to disable this feature often for unknown reasons. You can quickly disable/enable them using the SciTEUser.properties.


Open the SciTE user properties file in a text editor and add the following code to the file.

To disable Inline Errors, add the following.

# Display settings for inline errors on the source
error.inline=0

To enable Inline Errors, add the following.

# Display settings for inline errors on the source
error.inline=1

Selection Highlighting

In the latest SciTEforAutoIt3, there is a new feature which highlights other instances of the highlighted word or string. Due to the colors, sometimes it's hard to tell the selection apart.

If you'd like, you can do either of two things using the SciTEUser.properties.

  1. Disable it
  2. Change the color scheme

To disable it

highlight.current.word=0

To re-enable it, just delete it and save.

To change the color scheme, add the following to your SciTEUser properties file.

highlight.current.word.colour=#000040
selection.alpha=50
selection.back=#F025A8

Try adjusting the #COLOR values to get an effect you'd prefer.

More Language Highlighting Options

In the SciTEUser.properties file, add the following code.


# Language Highlighting Options
menu.language=\
#FreeBasic|bas||\
Text|txt|Shift+F11|\
#Ada|ads||\
AutoIt3|au3|Shift+F12|\
#Apache Confi&g|conf||\
#Assembler|asm||\
#ASN.1|asn1||\
#Avenue|ave||\
#Baan|bc||\
#&Batch|bat||\
#Bullant|ant||\
#&C / C++|cpp||\
#CMake|cmake||\
#C&#|cs||\
#COBOL|cob||\
#Csound|orc||\
#CSS|css||\
#D|d||\
#&Difference|diff||\
#&Eiffel|e||\
#Erlang|erl||\
#&Errorlist|err||\
#FlagShip|prg||\
#&Fortran|f90||\
#&Fortran|f90||\
#Gap|g||\
#Haskell|hs||\
#H&ypertext|html|$(keyHTML)|\
#&InnoSetup|iss||\
#&Java|java||\
#Java&Script|js||\
#&Kix|kix||\
#Lisp|lisp||\
#Lot|lot||\
#Lout|lt||\
#Lu&a|lua||\
#Matlab|m.matlab||\
#&Makefile|mak||\
#MetaPost|mp||\
#MMIXAL|mms||\
#Modula-3|m3||\
#&nnCron crontab|tab||\
#NSIS|nsis||\
#Objective Caml|ml||\
#Octave|m.octave||\
#Opal|impl||\
#Pascal|pas||\
#Pe&rl|pl||\
#P&HP|php||\
#P&LSQL|spec||\
#P&ostScript|ps||\
#P&OV-Ray SDL|pov||\
#PowerShell|ps1||\
#PowerPro|powerpro||\
#&Properties|properties||\
#Pytho&n|py||\
#R|R||\
#Reso&urce|rc||\
#Ruby|rb||\
#Shell|sh||\
#S&QL|sql||\
#Specman|e||\
#&TCL|tcl||\
#TeX|tex||\
#&txt2tags|t2t||\
#&VB|vb||\
#VBScr&ipt|vbs||\
#Verilog|v||\
#VHDL|vhd||\
#&XML|xml||\
#&YAML|yaml||

For whatever language you wish to have an option appear under the Language menu option, uncomment the language.

Say you want to SciTE to give you the option to highlight batch script code, change the following string in the above list from

#&Batch|bat||\

to

&Batch|bat||\

Restart SciTE and if done correctly, the option should be present! Do this for any language listed in the above example list.

In the case that you uncommented a language and you notice that it's not being highlighted correctly, then we will have to edit some things in the SciTEGlobal.properties file.

Open the SciTEGlobal.properties file in a text editor and find the section

# import properties\all the language specific properties files

Below that section there will be a few strings that look like

#import properties\[syntax]

Uncomment the syntax related property you wish to have support for.

Say you wanted support for ruby, just locate the one that says ruby where [syntax] is written.