Scintilla icon SciTE Ru-Board Kernel Changes
Documentation   FAQ   Regular Expressions   Scintilla   LUA   SciTE Director   SciTE and Scintilla Commands   SciTE-Ru Kernel   Shell   SciTE Helper   History  

Text editor SciTE RU-Board 3.55 .102

All modifications of original SciTE editor has been developed by persons from Ru-Board community.
This document described all changes and extensions from original version of editor.
All modifications in source code marked by special tags to allow apply it to original separately.
You can examine updated editor with all of his expanded characteristics by downloading the package SciTE-Ru

List of modifications split in three parts to be more sense:

Interface

[LangMenuChecker] (Author: neo4max)
In the menu "Language" the current language states labels.
[UserPropertiesFilesSubmenu] (Author: mhb, arhohryakov)
Menu items for opening language properties files to put in a submenu "Edit Properties".
[CheckFileExist] (Author: neo4max)
Now SciTE checks the edited file on disk and in its absence, displays a warning. Besides fixed detection of change in the date the edited file.
[find.fillout] (Authors: Frank Wunderlich, VladVRO)
New property find.fillout is to define how will be filled input field in find dialog on start:
  0 (default) - if a selection exists and it hasn't got line breaks then fill field with the selection otherwise fill field with a word near cursor (as it was),
  1 - fill field with selection, if there is no selection then leave field blank,
  2 - never fill search field.
[MoreRecentFiles] (Author: Daniel Cardenas)
Recent files list can be expanded up to 30 items by new property:
save.recent.max=30
[save.session.multibuffers.only] (Author: VladVRO)
New variable in properties files to deny of saving session on exit if opened one buffer only:
save.session.multibuffers.only=1
[session.close.buffers.onload] (Author: VladVRO)
New variable in properties files session.close.buffers.onload for define should opened files be closed or not on load session.
For example to define do not close opened files:
session.close.buffers.onload=0
by default all opened files should be closed on load session.
[ReadOnlyTabMarker] (Authors: Midas, VladVRO, neo4max)
Added possibility to show Readonly status by additional symbols in tab name, which can be setup by property tabbar.readonly.marker, for example:
tabbar.readonly.marker= R/O
Added possibility of creation submenu in Tools menu.
All submenu items located on top of menu and separated by line from other.
For define submenu you should set up name first:
command.submenu.name.2.filepattern=Insert from Text
If it is part of another menu then you should setup parent's menu number:
command.submenu.parent.2.filepattern=4
And next for all subitems of this menu you should setup parent's menu number:
command.parent.6.filepattern=2
command.name.6.filepattern=Date and Time

Can insert separator between any new commands in menu Tools.
For example, command.separator.34.filepattern=1 adding separator before command 34.
Added possibility of a set check before command item of the menu.
For example: command.checked.34.filepattern=1.

All menu items text can be localized same as other menu command by file locale.properties.
[ToolsMax] (Authors: Moon_aka_Sun, VladVRO)
Extended amount of line in Tools menu till 300.
For creation of the user commands in user.context.menu it is necessary to use the formula:
User command = 9000 + number of this command in menu Tools
[ExtendedContextMenu] (Author: Dmitry Maslov, VladVRO)
You can setup each context menu now by using new parameters in .properties file:
user.context.menu.filepattern - editor context menu
user.tabcontext.menu.filepattern - tabbar context menu
user.outputcontext.menu.filepattern - output context menu
And you can create submenus there by using tags POPUPBEGIN and POPUPEND!
Format:
user.context.menu.filepattern=\
Command name1|IDM_COMMAND1|\
Command name2|IDM_COMMAND2|...
you can add separator by leaving both fields empty:
user.context.menu.filepattern=\
Command name1|IDM_COMMAND1|\
||\
Command name2|IDM_COMMAND2|...

If parameter absent or empty then context menu will standard.
[user.toolbar] (Author: Dmitry Maslov, VladVRO, UR4LTZ, neo4max)
You can setup toolbar now by using new parameter user.toolbar.filepattern in .properties file:
Format:
user.toolbar.filepattern=\
Hint1|IDM_COMMAND1|icon number1|\
Hint2|IDM_COMMAND2|icon number2|...
you can add separator by leaving fields empty:
user.toolbar.filepattern=\
Hint1|IDM_COMMAND1|icon number1|\
|||\
Hint2|IDM_COMMAND2|icon number2|...
If parameter absent or empty then toolbar will standard.

New property for setup user library with icons: user.toolbar.iconlib.filepattern=$(SciteUserHome)\gnome.dll
Toolbar buttons can display status on/off now based on the current state of parameter that switched by the button.
For example state of such parameters as wrap, read.only, view.whitespace displayed now by status pressed/released of related buttons IDM_WRAP, IDM_READONLY, IDM_VIEWSPACE.
[SaveEnabled] (Author: Dmitry Maslov, neo4max)
Buttons "Save" and "Save All" on the toolbar are disabled if the current file (all open files) do not differ from the saved.
[StyleDefHotspot] (Author: neo4max)
The value of setting style.lexer.stylenumber can use new field hotspot|nothotspot.
[FindResultListStyle] (Authors: VladVRO, Dmitry Maslov)
Internal search (Ctrl+Shift+F) result text looks more better now:
- file path in each line is minimized to the relative from search path.
- all tabs in result replaced by spaces, start spaces removed, double spaces replaced by single.
- searched string can be highlighted by setup new style parameter in properties:
style.errorlist.30=fore:#000000 ,bold

You can switch off this feature by setup new parameter in properties:
lexer.errorlist.findliststyle=0

And now you can highlight searched string in result of external search. You can setup format of title of the external search by two new properties lexer.errorlist.findtitle.begin and lexer.errorlist.findtitle.end.
[ErrorLineBack] (Author: UR4LTZ)
New variable in properties files
error.line.back
possible to set the background color of the error message in the output pane, other than error.marker.back.
[ReturnBackAfterRALL] (Author: neo4max)
New variable in properties files
find.replace.return.to.start=1
If 1, then pressing the button "Replace All" (or "Replace in Buffers") cursor after the replace back to its start position.
[find.bookmark] (Author: dB6)
New variable in properties files
find.bookmark=0
If 0, then pressing the button "Mark all" do not sets the bookmarks.
[NewFind-MarkerDeleteAll] (Author: Dmitry Maslov)
New variable in properties files
find.mark.delete=1
If 1, then pressing the button "Mark all" removed any earlier bookmarks.
[close_on_dbl_clk] (Author: Dmitry Maslov)
New variable in properties files
tabbar.tab.close.on.doubleclick=1
1 - Allows you to close the tab by double-clicking.
[new_on_dbl_clk] (Author: Dmitry Maslov)
You can open new buffer now by double click on empty space on right of tabs (a-la FireFox).
[TabsMoving] (Authors: VladVRO)
Added two commands in menu Buffers IDM_MOVETABLEFT and IDM_MOVETABRIGHT for shift current tab left or right.
[TabbarTitleMaxLength] (Author: VladVRO)
New variable in properties files
tabbar.title.maxlength=<number value>
set limit of tab text length (file name). If text length greater than setup value then text will cut off and finalized with "…"
[NewBufferPosition] (Author: VladVRO)
New variable in properties files
buffers.new.position=<number value>
0 - new tab should be opened at last position in buffers list (default), 1 - next the current tab, 2 - first in list.
[warning.couldnotopenfile.disable] (Author: mozers)
New variable in properties files
warning.couldnotopenfile.disable=1
1 - removes warning "Could not open file", which is shown at opening a nonexistent file. The new buffer with the set name will be silently created.
[ZorderSwitchingOnClose] (Author: VladVRO)
Modification variable in properties files
buffers.zorder.switching=1
if option is present then after closing buffer current buffer will be next in buffers stack.
[SetBookmark] (Author: Midas)
New variable in properties files
margin.bookmark.by.single.click=1
you can to set/remove the bookmark by single mouse click on bookmarks column.
[clearbefore] (Author: neo4max)
Property command.mode added a new option - clearbefore:[yes|no] with the following logic:
* clearbefore is no - behavior, as previously determined by the property clear.before.execute
* clearbefore:yes - as clear.before.execute=1
* clearbefore:no - as clear.before.execute=0
[output.caret] (Author: VladVRO)
New variables in properties files
output.caret.fore
output.caret.line.back
output.caret.line.back.alpha
Sets caret style of the output window.
[NewIcons] (Author: VladVRO)
New icons for the files associated with SciTE and for sessions files.
[import] (Author: mimir, VladVRO)
Changed rules for import file in properties files. In first case trying to load file with name as is, if file not found then adding extension ".properties" and repeat trying to open file.
It is possible to use import instruction in *.abbrev files.
[selection.hide.on.deactivate] (Author: mozers)
The parameter selection.hide.on.deactivate=0 allows to not hide selection from the text when window SciTE loses focus.
[scite.userhome] (Authors: gansA, mozers, VladVRO)
New variable in properties files
scite.userhome let you assign path to directory $SciteUserHome for user data saving. (SciTE.recent, SciTE.ses, SciTEUser.properties)
Possible to use in the path internal variables of SciTE, for instance:
scite.userhome=$(SciteDefaultHome)\home
[WarningMessage] (Author: VladVRO)
Now can to set up alert with warning message for each warning type:
warning.findwrapped.message=alert's text
warning.notfound.message=alert's text
warning.wrongfile.message=alert's text
warning.executeok.message=alert's text
warning.executeko.message=alert's text
warning.nootherbookmark.message=alert's text
[autocompleteword.incremental] (Author: Sergey Kishchenko)
New variable in properties files
autocompleteword.incremental=1 for autocompleteword.automatic=1 show the multivariate hint of the found word completion. (See details)
[utf8.auto.check] (Author: mhb, neo4max)
Enhance function of auto checking utf8: providing two methods
utf8.auto.check=1: detect utf8 and add BOM automatically
utf8.auto.check=2: detect utf8 and do not add BOM
[oem2ansi] (Author: gansA)
Parameter output.code.page.oem2ansi=1 turn on console output text encoding from OEM to ANSI.
It let to edit script in win1251 codepage and see it output in console in dos866 codepage without switching codepages.
[caret] (Author: mimir)
Added possibility to customize the width and the color of cursor for every lexer individually, i.e. like this:
caret.fore.$(file.patterns.cpp)=#FF0000
caret.width.$(file.patterns.cpp)=3
It is not convenient when there are different colors and backgrounds for different languages but there is only one color for cursor.
[BetterCalltips] (Author: chupakabra)
New variable in properties files
calltip.lexer.automatic
calltip.*.automatic
Setting this option to 0 disables automatic calltip popup display but leaves user with possibility to invoke calltip manually. The * form is used if there is no lexer specific setting.
calltip.lexer.show.per.page
calltip.*.show.per.page
This option specifies number of definitions displayed per page in calltip window (default 1). Use arrow buttons to switch to next/previous page. The * form is used if there is no lexer specific setting.
calltip.lexer.word.wrap
calltip.*.word.wrap
This option enables word wrapping of calltip lines. Specify maximum number of characters allowed per line. Specify 0 to disable this feature (default). The * form is used if there is no lexer specific setting.

Calltip horizontal position is adjusted to maximize amount of information displayed. This is useful when cursor is located closely to right window border for example.

New Scintilla commands to support several highlight regions inside calltip window (SCI_CALLTIPADDHLT, SCI_CALLTIPCLEARHLT, SCI_CALLTIPUPDATEHLT).
[TextSizeMax for Dialog] (Author: dB6)
Increased buffer size for dialog box text conversions up to 1024.
[ignore_overstrike_change] (Author: Dmitry Maslov)
New variable in properties files
change.overwrite.enable=0 includes a mode of ignoring of switching of a mode INS/OVR.
At 1 or absence of this parameter the mode by default operates.
It is possible to set this parameter through SCI_SETOVERTYPE
0 - insert mode (default)
1 - overstrike mode
2 - ignoring of switching of a mode
3 - no ignoring of switching of a mode (default)

Extensions

[ForthImprovement] (Author: VladVRO)
Lexers Forth and Crontab was improved. There was implemented folding and some new keywords sets.
In the Forth lexer was fixed algorithm for finding the closing tag of string [ ].
[BatchLexerImprovement] (Author: VladVRO)
Lexer batch was greatly improved (used for processing of batch files *.bat, *.cmd, *.nt).
Processing of left parenthesis was fixed.
Parentheses is highlighted by style SCE_BAT_OPERATOR now and folding was made at them.
Three new styles were added:
- SCE_BAT_ENVIRONMENT for highlight environment variables like %variable%,
- SCE_BAT_EXPANSION for highlight environment variables like !variable!,
  new property lexer.batch.enabledelayedexpansion=1 is setup this highlight on, by default it is off.
- SCE_BAT_CLABEL for highlight links to the labels like :name.
[LocalizationFromLua] (Authors: VladVRO, neo4max)
In SciTE Lua Scripting Extension added new command:
scite.GetTranslation(s, [retainIfNotFound]), it returns translation of the sentance s,
retainIfNotFound - (by default is true) should return the input value if translation was not found.
Translations are taken from the file locale.properties.
[OnFinalise] (Author: VladVRO)
Added new SciTE event in Lua API OnFinalise(). Event arises on exit from editor.
[ABAP] (Author: VladVRO)
Added new lexer for ABAP/4 language.
[EncodingToLua] (Authors: neo4max)
In SciTE Lua Scripting Extension added new commands:
string.to_utf8(codepage) - converts the text from the specified codepage to UTF-8
string.from_utf8(codepage) - convert text from UTF-8 to the specified codepage
Codepage parameter is specified as a number.

string.utf8upper() - converts utf8-string to uppercase
string.utf8lower() - converts utf8-string to lowercase
string.utf8len() - returns utf8-string length (in characters)

Added a new function
pane:codepage(), where pane - this is one of the (editor|output)
returns the current encoding of the pane as number.

Now function os.rename, os.remove, os.execute trying to interpret the input arguments as UTF-8. If not - then the system default encoding.

Modified the function to load external libraries and scripts - require.
Now she has the ability to download the external libraries, even if the path to it contains characters other than the system encoding.
[EditorUnicodeMode] (Author: VladVRO)
Added new property editor.unicode.mode for editor unicode mode which has been assigned by editor and can be one from next states: IDM_ENCODING_DEFAULT, IDM_ENCODING_UCS2BE, IDM_ENCODING_UCS2LE, IDM_ENCODING_UTF8, IDM_ENCODING_UCOOKIE.
[macro] (Author: VladVRO)
Support of record and play macro using LUA.
[OnMenuCommand] (Author: VladVRO)
Added new SciTE event - OnMenuCommand (msg, source)
msg - function id (SCI_constant)
source - input parameter of editor's internal function MenuCommand.
It can be equal to IDM_SRCWIN (350) - editor's window, or IDM_RUNWIN (351) - output window, or something else where the focus is.
[OnSendEditor] (Author: VladVRO, neo4max)
Added new event to SciTE - OnSendEditor (msg, wp, lp)
Parameters the same as SendEditor.
msg - function id (SCI_constant)
wp and lp - input parameters, wp - numeric, lp - string. According to function they can be used or not.
OnSendEditor called for command that available for macro recording only and for SCI_SETREADONLY.

Example of letter case changing macro:
function OnSendEditor (msg)
  if msg == SCI_UPPERCASE then
    ChangeCase("U")
  elseif msg == SCI_LOWERCASE then
    ChangeCase("L")
  end
end
[OnClick] (Author: Dmitry Maslov)
Added new event to SciTE OnClick(). Event arises from a single click on the mouse left button in the editing pane or the output pane.
Receives the state of key modifiers (Shift, Ctrl, Alt):
function OnClick(shift, ctrl, alt)
[OnDoubleClick] (Author: mimir, Dmitry Maslov)
Event OnDoubleClick() is expanded, now it is returned to the state of key modifiers (Shift, Ctrl, Alt):
function OnDoubleClick(shift, ctrl, alt)
[OnHotSpotReleaseClick] (Author: mozers)
Added new event to SciTE OnHotSpotReleaseClick(). Event arises from a mouse button up in the hotspot.
Receives the state of Ctrl:
function OnHotSpotReleaseClick(ctrl)
[OnKey] (Author: Dmitry Maslov)
Function OnKey is expanded, now in it the pressed symbol is passed also:
function OnKey(key, shift, ctrl, alt, char)
[OnMouseButtonUp] (Author: VladVRO)
Added new event to SciTE OnMouseButtonUp(). Event arises from a mouse button up in the editing pane or the output pane.
Receives the state of Ctrl:
function OnMouseButtonUp(ctrl)
[UserListItemID] (Author: neo4max, Dmitry Maslov)
Event OnUserListSelection returns the third parameter with id position of the selected item in the list.
[MouseClickHandled] (Author: VladVRO)
Added new message SCI_SETMOUSECAPTURE to the Scintilla for change mouse cuptured state.
This message let to inform the Scintilla that mouse click handled.
Example: SendEditor(SCI_SETMOUSECAPTURE, 0)
And this message will be sent if OnClick() or OnDoubleClick() returns true.
[CheckMenus] (Author: neo4max)
In SciTE Lua Scripting Extension added new command
scite.CheckMenus() - that allows to update the state of the menu and toolbar SciTE.
[Perform] (Author: VladVRO)
In SciTE Lua Scripting Extension added new command
scite.Perform(actionList) - execute commands SciTE Director Interface
with actionList - one or several commands separated by a symbol of a new line.
[ReloadStartupScript] (Author: VladVRO)
In SciTE Lua Scripting Extension added new command
scite.ReloadStartupScript() - this function initializes Lua startup script reloading.
[GetWordChars] (Author: Dmitry Maslov)
CurrentWordCharacters - new SciTE environment variable. Contains which characters can be parts of words.
[BufferNumber] (Author: VladVRO)
BufferNumber - new SciTE environment variable. Contains number of the current buffer.
[InsertAbbreviation] (Authors: mimir, VladVRO, Dmitry Maslov, neo4max)
In SciTE Lua Scripting Extension added new command
InsertAbbreviation(string)
where "string" - is a text, on a format similar to abbreviation, for example:
scite.InsertAbbreviation("<a href="|" title="">%SEL%</a>")
The text of the expansion, you can use user variables:
- %SEL% - selected text
- %CLP% - text from clipboard
- %var_name% - value of internal variable SciTE (for example, CurrentSelection, FileNameExt, SciteDefaultHome etc.)
When used in expansion a percent sign he doubled.
[ParametersDialogFromLua] (Author: VladVRO)
In SciTE Lua Scripting Extension added new command for show "Parameters" dialog (Shift+F8)
scite.ShowParametersDialog(text)
text - short comment for window.
Return false if the user has refused (has pressed a Cancel or Escape) differently true.
Sample:
  function Dialog()
    props["1"]=props["CurrentSelection"]
    props["2"]=props["SciteDefaultHome"]
    if scite.ShowParametersDialog("Please set params") then
    print ("1="..props["1"].."\n2="..props["2"].."\n3="..props["3"].."\n4="..props["4"])
    else
      print ("Cancel")
    end
  end
[FileAttr in PROPS] (Author: Midas)
Now accessible from scripts additional file properties
FileAttr, FileTime, FileDate.
[CalltipBreaks] (Author: Mitchell Foral)
Long bubble helps can be carried on the next line (by adding symbol \n at appropriate line in api-file)
[Euphoria] (Author: M Duffy, Midas)
Add new lexer Euphoria
[C_Word] (Author: mimir)
Added 3 new classes for LexCpp's keywords (i.e. now you can set up to 4 additional vocabularies with different highlight)
[PropsKeysSets] (Author: VladVRO)
Added 4 classes for LexProps's keywords (i.e. now you can set up to 4 additional vocabularies with different highlight)
And words can contain symbol ~, meaning a random set of characters. For example block.start.~ or braces.~.style
[PropsKeywords] (Author: VladVRO)
Added colorizing for "import" and "if" keywords in properties file.
[GetApplicationProps] (Author: VladVRO)
New function SciTEBase::GetProps() (for developers) allows to get access to properties of the editor in any place of a code of the editor.
[Zoom] (Author: Dmitry Maslov)
Now OnSendEditor can trace event SCI_SETZOOM arising at change of the size of a font.

Bug fix

[FixReplaceOnce] (Àâòîð: neo4max)
Fixed a bug in the dialogue "Replace". Entered in the dialog box, the search parameters can be accidentally modified command editor:findtext
Added a warning appears when you click "Replace" after the last change has produced.
Fixed error when moving the cursor in the serial replacement.
[FixFind] (Àâòîð: neo4max)
If the document ends with a blank line, and in the dialog box, specify search "^$" (RegExp mode), then when you click on "Mark All" arose loop.
[FixEncoding] (Àâòîð: neo4max)
Now all calltip and text for the abbreviation are displayed and inserted in the current encoding of the active buffer.
This requires that by appropriate API and ABBREV files were encoded in UTF-8.
[cmdline.spaces.fix] (Author: nail333)
Fixed bug associated with opening a blank tab if the presence spaces in the end of the command line.
[OpenNonExistent] (Author: neo4max)
Fixed bug associated with opening a nonexistent file.
[PropsColouriseFix] (Author: VladVRO)
Fixed coloring of syntax in properties files for long lines (more then 1024 chars) and for lines with division of words.
[LuaLexerImprovement] (Author: VladVRO)
Changed lexer for language Lua.
Simbols ":" and "." processed as separator for object now. You can setup lexer keywords as string.sub or editor:append as before and you can setup object function or property as :GetText or .Cursor now.
[GoMessageImprovement] (Author: VladVRO)
Made the editor window focused after uses double-click in console on message with file name and line number.
For implementation used [OnMouseButtonUp] improvement.
[fix_invalid_codepage] (Author: Dmitry Maslov)
Bug fixed at which switching in the "Code Page Property" did not work if the props code.page has been set incorrectly.
[English_KeyCode] (Author: Dmitry Maslov)
Bug fixed at which keyboard shortcut ceased to work after switching keyboard layout.
[InputErr] (Author: mimir)
Bug fixed in deadlock of SciTE on using command.input.
If user forget to select text before running script it cause deadlock.
[StyleDefault] (Authors: VladVRO, Dmitry Maslov)
Are removed default values of symbols color (black) and a background (white), that allows to not set them obviously in files of adjustment in all styles for set of a corresponding background at export of a file.
If the style.*.32 do not raised characters and the background color, these parameters are collected from your Windows, i.e. equal system Window Text/Background.
[find_in_files_no_empty] (Author: Dmitry Maslov)
"Find in Files" now is not started if into a input box "Find what:" have entered nothing.
[FileReaderUnlimitedLen] (Author: VladVRO)
Removed the restriction on the length of lines in the internal Find in Files. Earlier in long lines only to find worked 1,001 characters, the rest ignored.