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:

  1. Code Folding … for HTML too!!
  2. 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.
  3. 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 supports folding for many languages (see the list of languages understood by SciTE for more information.) Fold points are based upon indentation for Python and on counting braces for the other languages. The fold point markers can be clicked to expand and contract folds. Ctrl+Shift+Click in the fold margin will expand or contract all the top level folds. Ctrl+Click on a fold point to toggle it and perform the same operation on all children. Shift+Click on a fold point to show all children.

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

Table Legend:


table cells of this Style: =my own selections
   
position.width
position.height
=1024
=768
position.left

position.top
position.width
position.height

Set the initial window size and position. If these are omitted then the environment’s defaults are used. [NOTE:]If the width or height are -1 then the window is maximized.
split.vertical =1
split.vertical
output.horizontal.size
output.vertical.size
output.initial.hide
If split.vertical is set to 1 then the output pane is to the right of the editing pane, if set to 0 then the output pane is below the editing pane. The output.*.size settings determine the initial size of the output pane. If output.initial.hide is 1, then the output pane is hidden when SciTE first starts up even when output.*.size is set; otherwise the output pane is shown at startup.
clear.before.execute If set to 1 then the output pane is cleared before any tool commands are run.
code.page
LC_CTYPE
output.code.page
=65001
=en_US.UTF-8
=65001
code.page

output.code.page

[SNIP]This option can only be 0 or 65001 on GTK+ where SciTE only supports single byte character sets and Unicode. Setting code.page to 65001 starts Unicode mode and the document is treated as a sequence of characters expressed as UTF-8. [SNIP]Tahoma is a good choice on Windows 2000.[snip]For GTK+ 1.x, the locale should be set to a Unicode locale by setting the LC_CTYPE property. For an English machine this can be LC_CTYPE=en_US.UTF-8[SNIP] If output.code.page is set then it is used for the output pane which otherwise matches the edit pane.
character.set NOT AN ENCODING, but a font setting! as stated, accoding to Neil Hodgson, SciTE Software Author:
character.set is a numeric property and is incapable of setting Unicode mode. code.page can be set to 65001 for UTF-8. character.set is used to find a font for drawing the text. code.page is used to work out how the stream of bytes makes up characters.

[SNIP]… All of these values may work on Windows, but on GTK+ Baltic, Turkish, Thai and Vietnamese will probably not work.To use Cyrillic characters on Windows, set character.set=204 (CP1251 encoding). To use Cyrillic characters on GTK+, set character.set=204 (KOI8-R encoding) or character.set=1251 (CP1251 encoding).[SNIP]

My Latest Discovery regarding the code.page / character.set issue - property convention of SciTE: I have confirmed the following settings to work, for ISO-8859-1, Windows-1252, and utf-8 and various other official IANA character set names / alias names set forth in the document < ____ >†.
As a Western European codepage user, I typically use iso-8859-1, or UTF-8 to declare a proper character set for the HTML document. Translating this into SciTE code.page and character.set property values, respectively, for Windows-1252, according to my understanding and first-hand experience, the following values produce what I preceive to be desirable results:
code.page=CP1252
character.set=1252
output.code.page=CP1252


(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.)

the proper reference to be inserted momentarily. the author admits he has misplaced the URL bookmark, and local record thereof. Please accept the author’s apology, and return soon for the amended citation. Thank you.
(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
BACK TO TOP | All Content © 2006 - 2009, NoviceNotes™ | © 2009 NoviceNotes.Net