SciTE – Quick Reference:
SciTE: General Info & Commentary
What is SciTE?
Scintilla is a source-code editor designed with the advanced programmer in mind. The unique features built into Scintilla are designed primarily for debugging and compiling source code. Scintilla targets an audience comfortable with compiling software from the source, as there is no pre-compiled, executable installation file available for Windows.
SciTE however, as the name implies, is a Scintilla based Text Editor presented by the Scintilla developers to demonstrate the capabilities of Scintilla, and it’s a great little feature-rich goody!
SciTE and other Text Editors
Unlike Notepad++ (aka. Notepad Plus), another text editor built on the Scintilla engine– which does indeed have a more “windows” feel to it than SciTE (it’s stuffed with features, and menus full of options), SciTE is a very “bare-bones” basic, yet very practical software.
It’s difficult to waste time when using SciTE because there’s little to it outside of the most basic options. The Linux version of SciTE doesn’t even have a toolbar menu– just text-based pull-down menus common to most GUI apps, such as “File, Edit, Search, Options, and Help”. I’ve grown an affinity for SciTE because of its simple nature. When I need to quickly edit a file, I choose SciTE because I’ll just “get in and get out” without getting lost in a slew of options dialogs like i might in †Notepad++.
General Commentary from this web log Author…
Though I do enjoy the simplistic nature of SciTE, it is nevertheless an awesomely powerful source-code editor with many features not found editors which may seem similar at face value. The key word with SciTE is Source Code editor, and for source-code unique tasks, it is supreme.
If you’re new to Linux, you’re a programmer or Web Developer / Designer, and you prefer a very lightweight text-editor, then SciTE is definitely a candidate for becoming one of your favourites. Try the built-in “compile”, “build”, or “Go” program execution scripts which open in the vertical-split-panel viewing area– even with PHP (using the “Go” command), you’ll be amazed at the versatility and practical value of SciTE. Check it out!
NOTE: It is important that the reader understand that the contents found in this article are abbreviated versions of exact copies of my local SciTE Documentation(1), which was distributed with the Software as part of Linux Fedora Core 5. Please see the official SciTE F.A.Q. at Sourceforge.net for the proper documentation.
the Scintilla Text Editor: SciTE
More details about SciTE, and how to get your own copy are at the end of this article.
SciTE Quick-Reference Cheat Sheet
SciTE manages to maintain its “lightweight” feel by keeping the configuration settings in an Options file, and out of the way of the user interface. This means that in order to tweak SciTE to your own preference, you must edit a text file– not unlike the Apache httpd.conf, or the PHP configuration file, php.ini– with SciTE you must understand what settings are available, and what the available parameters are for each of those settings. There is a vast array of possibilities– way too many for me to remember, so i’ve set out to create a cheat sheet for customizing my user-experience when working in SciTE. (Currently writing from a Windows XP session, i can now say that this document is designed to help customization of SciTE in both the Linux and the Windows O/S environments.)
Favourite Features:
- Code Folding … for HTML too!!
- PHP.net – .chm Help File Integration††
due to a long-line of code, the instructions listed below were modified. when using the config. settings, be certain not to use the line-break as shown here. - Always on Top: great for manually copying text, from an image for example– especially in the MS Windows environment (as both Gnome and KDE, if not all of the X-server window managers offer such customized window-management inherently).
††
Integrate the PHP Manual as a tool of SciTE:
Place this in Scite config file:
command.help.$(file.patterns.php)=
$(CurrentWord)!$(SciteDefaultHome)\help\php\php_manual_en.chm
command.help.subsystem.$(file.patterns.php)=4
In this case the CHM Edition of the PHP Manual is placed in
C:\Program Files\SciTE\help\php.2
SciTE – Code Folding:
SciTE – Sessions:
A session is a list of file names. You can save a complete set of your currently opened buffers as a session for fast batch-loading in the future. Sessions are stored as plain text files with the extension “.ses”.
Use File | Load Session and File | Save Session to load/save sessions. You can turn on/off “last session autoloading” using SciTE properties variable “save.session“.
SciTE – Properties Files
- [Scite Properties Files] lines [syntax] are in the form:
variable=value
- [Use] ‘\’ character at the end of the line [to continue a property] value on the next line, if necessary.
- Space characters are significant so x =1 defines a variable called “x “.
- Values may include the values of other variables by using $(variablename).
There are some variables set by the environment to access the name of the current file as well:
| Name | Meaning |
|---|---|
| FilePath | full path of the current file |
| FileDir | directory of the current file without a trailing slash |
| FileName | base name of the current file |
| FileExt | extension of the current file |
| FileNameExt | $(FileName).$(FileExt) |
| SessionPath | full path of the current session |
| CurrentSelection | value of the currently selected text |
| CurrentWord | value of word which the caret is within or near |
| Replacements | number of replacements made by last Replace command |
| SelectionStartColumn | column where selection starts |
| SelectionStartLine | line where selection starts |
| SelectionEndColumn | column where selection ends |
| SelectionEndLine | line where selection ends |
| CurrentMessage | most recently selected output pane message |
| SciteDefaultHome | directory in which the Global Options file is found |
| SciteUserHome | directory in which the User Options file is found |
Conventions of Textual Notation Herein:
- text marked in [brackets]
The classic proofreader / authors’ / and Editors’ technique: indication of one’s own comments, or textual modifications away from the original, or verbatim-quoted text. - Prepended Rows
I’ve decided to prepend to the official SciTE doc.s, my own preferred settings. It should (but may not be) off-set from the standard documentation by color, font-family, and its lack of technical description
SciTE : [Character] Encodings
SciTE will automatically detect the encoding scheme used for Unicode files that start with a Byte Order Mark (BOM). The UTF-8 and UCS-2 encodings are recognized including both Little Endian and Big Endian variants of UCS-2.
UTF-8 files will also be recognised when they contain a coding cookie on one of the first two lines. A coding cookie looks similar to “coding: utf-8″ (“coding” followed by ‘:’ or ‘=’, optional whitespace, optional quote, “utf-8″) and is normally contained in a comment:# -*- coding: utf-8 -*-
For XML there is a declaration:<?xml version='1.0' encoding='utf-8'?>
For other encodings set the code.page and character.set properties.
SciTE – User Preferences: Defined variables in Properties files
(much more to be added to this table. this is just to establish the structure. I will add items as I experiment with them, and as they become relevant to my own configuration. NOTE: This is NOT a complete listing of all available SciTE properties. Please visit the SciTE page at SourceForge if you seek a comprehensive documentation.)
(1)Scite: SCIntilla based Text Editor. Documentation, Frequently Asked Questions. Rev January 15 2007. http://scintilla.sourceforge.net/SciTEDoc.html (02/2007)
(2)Extended CHM Format: PHP Documentation. the PHP Group. Rev. Mon Apr 9 07:34:35 2007. Available at http://www.php.net/docs-echm.php . Accessed: Apr-09, 2007