--------------------------------------------------------------------------------
  SYN
  Coder-style Total Commander lister plugin
  by Sep.
--------------------------------------------------------------------------------

NOTES:
  * Trim trailing spaces
    When enabled, then all last CR,LF will be trimmed also

  * Use internal HTM ACP
    When highlighter name is 'Xhtml.hgl' then it will use internam html autocompletition. Because for different tags there are different values, it is hard to code usual htm.acp file. Internal html autocompletiton stored in 'cfg\htm.int' file. If you don`t code html you can disable this.

  * Use int. HTM ACP in string vars
    When coding on PHP you may want to write html code in "string" variables. It will disable highlighter depended ACP inside strings and activate internal HTM ACP.

  * Gutter Font
    Width of char calculates by widest one, so there free space at left when font is non-monospace.

  * Auto detect codepage
    Auto detect ignore MAC codepage. You need to turn it on manually each time. If auto detection switched off, then used WIN codepage by default

  * Auto indent after {
    For C++ like syntax languages (PHP). Type '{' bracket and press RETURN, block of code will be created automatically

  * Save last state for ... files
    Stores cursor position, bookmarks & selection for last ... files.

  * Save history for ... search queryes
    Stores last ... QuickSearch, Find & Replace queryes

  * Path to PHP interpreter
    Used for PHP Macros, stored in Syn/Macros folder

  * Error check command
    Console application and its comand line parameters for error checking current document. If document was modified, then it will create temporary file in current folder with all modifications and check it. If document was not modified, then it checked directly.

  * Line number after
    Error check application may return number of string with error, like : 'Syntax error on line:56' Then you can use string 'line:' to detect line number. If it recognized, then error marker will be set, and cursor mover to error line.

  * Path to context *.chm help
    Used for context help by pressing Ctrl-F1 with cursor on some function. You can download official PHP .chm manual from: http://www.php.net/download-docs.php
    Use one of next strings, depending of your version of PHP manual:
    c:\path\to\php_manual_en.chm::en/function.%WORD%.html
    or
    c:\path\to\php_manual_en.chm::function.%WORD%.html

  * Comment Block start/mid/end char
    Used when you are commenting/uncommenting selection. Start char added to start of selection. Mid char added to start of every line. End char added to end of selection. So you can make any type of commenting selection you like.

  * Function RegExp string
    Used in Code Explorer to search functions, stored in highlighter. If you know Regular Expressions you can easy write detect string for any language. Rules are: Matches[2] (Second braces) must point to function name. Matches[3] - to function params, if any. Matches[4] to return type, if any. You can use naming braces too. Names are: 'name', 'params', 'type'. Example for php:
    function\s+(?P<name>[a-z_]+[a-z_0-9]+)\;?\s*?(?P<param>\([^\)]*?\))?\s*?\{
    OR without naming braces:
    (function)\s+([a-z_]+[a-z_0-9]+)\;?\s*?(\([^\)]*?\))?\s*?\{
    Also you can use non-storing braces: (?: )
    Searching for functions runs if there 2sec no key was pressed, and runs in parralel thread with low priority. So there mustn't be any slowdowns in text window.

  * Variable RegExp string
    Used  in CodeExplorer to search for variables, stored in highlighter. Matches[2] must point to variable name. Matches[3] optionally point to indexing part of variable. If you use naming braces, their names are: 'name' and 'index' Detect string for PHP looks like:
    [^\$](?P<name>\$[a-z_]+[0-9a-z_]+)(?P<index>\[[^\]\$]+\])?
    OR without naming braces:
    ([^\$])(\$[a-z_]+[0-9a-z_]+)(\[[^\]\$]+\])?
    Also you can use non-storing braces: (?: )

  * Include RegExp string
    Same as above, used for detecting included files. Usefull for php. Found files will be parsed and their Vars/Funcs added to ACP. Use Matches[2] or brace named 'file' to point to filename. File path name calculated from dir of opened file. (There no checking for comments and string vars when parsing include files now). Look php.hgl for example.

  * Add Vars to ACP when in string
    When enabled "Use int. ACP in string vars" and cursor is inside string variable, then all found variables will be added to ACP if you press Ctrl-Space. Usefull for PHP ".." strings, and <<<heredoc strings.

  * Customizing Shortcuts
    List of aviable shortcuts is devided by 2 groups. First is 'buttons', and second - 'editor'. Some actions are presets multiple times (Copy, Cut, Paste ...). So you can assign multiple keystrokes to one action. 'Copy to clipboard as Unicode' work only thru button 'Copy', so there is assigment Ctrl-C to button. All other dublicate shortcuts are assigned to editor, because they will work faster in that way. Mouse Middle cannot be assigned to editor, only to buttons!

ADDITIONALY:
  * QuickCode
    Stored in *.qc files in Syn/HL folder for each type of highlighter. Using: type abreviation and press Ctrl-J, then full code will be expanded and cursor set in position of pipe '|' character.

  * Autocompletition
    Stored in *.acp files in Syn/HL folder for each type of highligter. Using: Press Ctrl-Space to help with function names. Press Ctrl-Shift-Space inside of function brackets '( )' to show help on its parameters.

  * Default position/size
    It's possible to set default position/size for window when you open file not in history (or history disabled) For lister (F3) you need edit/add those strings to [Lister] section of wincmd.ini
    x=241  //left
    y=214  //top
    dx=796 //width
    dy=596 //height
    For syn.exe (F4) you can set same strings in [Setup] section of 'cfg\setup.ini' file

  * Text formatting
    When there no text selected, only lines longer than RightMargin will be formatted. When you select text and press any of format options, then selected text will be reformatted. In this mode, paragraph delimeter is double line break. It will try to insert space to start of every paragraph in Left/Justify mode if there was spaces. If no, you can reformat Right, then Left, it'll add spaces. Single line breaks, tabs and spaces are interpreted as one space char. (this is because no soft/hard break in plain text mode) If you press format button directly, then last selected format option will be executed.


DEFAULT SHORTCUTS:
  Esc             Close
  Alt-X           Close with TotalCommander
  Ctrl-N          New file
  Ctrl-O          Open file
  Ctrl-S          Save file
  Ctrl-Shift-S    Save file as
  F4              ReadOnly toggle (Space = PgDn in ReadOnly))
  F6              Syntax Designer
  F9              Options
  F11             CodeExplorer

  Ctrl-F          Quick Search (ESC,TAB - exit, ENTER - find next, TYPE - find first)
  Crtl-R          Multistring Search/Replace
  F7              Lister Search
  F5              Lister Find Next
  F3              Find Next (Last query from Search/Replace, QuickSearch, ListerSearch)
  Shift-F3        Find Previous (Last query from Search/Replace, QuickSearch, ListerSearch)
  Ctrl-F1         Context *.chm help
  F8              Error check
  Ctrl-F5         Set/Clear breakpoint for phpExpertDebugger

  Ctrl-B          Quick <b> tag
  Ctrl-I          Quick <i> tag
  Ctrl-U          Quick <u> tag
  Ctrl-Enter      Quick <br /> tag
  Ctrl-Shift-Up   Insert/edit color
  Ctrl-T          Insert date
  Ctrl-PgDn       Collapse Current
  Ctrl-PgUp       Uncollapse All
  Ctrl-/          Line comment/uncomment (need to setup char in options)

  Shift-F4        Toggle case of current word
  Ctrl-G          Go to line
  Ctrl-BkSp       Delete last word
  Ctrl-A          Select All
  Tab             Indent
  Ctrl-Shift-I    Indent
  Shift-Tab       Unindent
  Ctrl-Shift-U    Unindent
  Ctrl-L          Insert to line after
  Ctrl-W          Word wrap toggle
  Ctrl-T          Delete word
  Ctrl-Y          Delete line
  Ctrl-Shift-Y    Delete to EOL
  Ctrl-D          Duplicate Line
  Ctrl-]          Select Word on cursor
  Ctrl-Z          Undo
  Ctrl-Shift-Z    Redo
  Ctrl-Shift-0..9 Set bookmark
  Ctrl-0..9       Go to bookmark
  Ctrl-Shift-N    Normal select
  Ctrl-Shift-C    Column select
  Ctrl-Shift-L    Line select

  Ctrl-Shift-Down Find declaration
  Alt-Left        Back in CodeExplorer navigating history
  Alt-Right       Forward in CodeExplorer navigating history
  Ctrl-[          Go to Matching bracket
  Ctrl-Shift-B    Go to Matching bracket
  Ctrl-Space      Auto completition proposal
  Ctrl-Shift-Spc  Function parameters help
  Ctrl-J          QuickCode

HISTORY:
  v1.5
  Missed WinXP manifest inside syn.exe
  Bug with color of default font & BG when no highlighter
  Reset of codepage to WIN, when press "W" in ReadOnly mode
  Exit keys are blocked now on loading
  Simple text formatting (Right/Left/Center/Justify), details in readme.txt
  Options for QuickSearch in it's context menu
  Dont start now by Ctrl-Q on folder in clear TC
  Some small fixes

  v1.4  //08.09.06
  Reset selection from history on load
  Sort toggle added to tree context menu
  Char pos on statusbar now counts from 0
  You can associate internal designer to *.hgl files now
  Clipboard panel
  CharMap panel
  Fixed gutter calculation, when gutter font differs from text font
  Bug with gutter width when collapsing lines
  Bug with very first char of text when Replace All
  Option to disable hints in tree (when wrong repaint)
  Highlights current IndentGuide for cursor position
  Skip CodeFolding token if it is Character type and found in comment/"string" (Not supported for Keyword type now)

  v1.3  //02.09.06
  Bug with selection reset on CodeExplorer update
  Possible to set default position of window when first open of file (readme.txt for details)
  When click on include file, its name passed in quotes now
  CodeExplorer highlight color now taken from Windows
  Alt-X in syn.exe dont close TC
  Paint line BG when set Bookmark by hotkey
  Set focus to editor when close Search/Replace panel
  Cursor moves to next line at end of line in WordWrap when press Right
  Select contents of Search/Replace fields when first enter to them
  New shortcut- Select Word on cursor (Ctrl-])
  New search mode - 'Whole Words only'
  No remove last CRLF at end of file (when 'Trim trailings' disabled)
  MatchToken bug when Del selected or PgUp/PgDn
  Unicode copy to clipboard allways if possible
  Wrong window size calculation when run thru syn.exe (no crop of statusbar)
  More than one sublevel of files incuding
  Bug with TopLine position in history when WordWrap

  v1.2 //25.08.06
  Bug with Setup window when in QuickView
  Sometimes 'Read beyond end of file' bug fixed
  Broken actions in buttons 'Code Folding', 'SpecChars', 'ShowNumber', 'RightMargin'
  Bug with 'none' key in editor shortcuts
  Bug with delete column selection and undo deletion
  Some improvements in tree redraw
  Bug when save acp for functions without parameters
  Bug with Sort all file, Ctrl-A Del, WordWrap at end of file
  Bug when moving to start of history CodeExplorer navigation
  Some improved speed of Setup show, bug with display name of .qc file in Setup
  Simple opening included files in CodeExplorer by Ctrl-Click
  Bug with color select (Ctrl-Shift-Up) when CodeExplorer update
  Some CodeFolding, Undo, Redo bugs fixed (thanx DavidCl0nel)

  v1.1 //22.08.06
  Shortcut now displayed in hint over buttons
  Quick search in tree (partial match by search in context menu). Full match by typing when tree focused
  Hint with function description when mouse over for one sec.
  Scan for user func/var after file open (even if CodeExplorer closed), but no rescan when typing
  'Copy link adress' added to context menu over link
  Ctrl-Click dont reset cursor to start of file if function not in this file
  History of CodeExplorer navigation (Alt+Left - back, Alt+Right - forward)
  Added some more actions for shortcut assignment
  Found func/vars added to current HL, to styles which names starts 'function' or 'var' if those styles are keylists.
  Match Bracket extended to Match Token. Reads CodeFolding ranges as highlight tokens additionaly to {[(<
  Color for NON-matching token added in options
  No reset cursor pos to start of file on Ctrl-[
  It is now possible to save scanned contents of CodeExplorer to .acp file (for easy create acp for new lang)

  v1.0  //18.08.06
  Shortcuts customization
  Small bug when detecting extention for highlighter
  Wrong position of Codepage & LineEndings popups when style non OfficeXP
  Collapse level 0/1 added to open by default settings
  Some bugs with repaint of toolbars when style is 'default' in syn.exe
  Now search for space char works in Ctrl-R
  Optionally saving of .bak files
  Bug with view position in history when WordWrap enabled
  Simple integration with phpExpertDebugger (www.ankord.com),Ctrl-F5 - set/clear breakpoint
  Included files recognition and parsed Vars/Funcs added to ACP (example in php.hgl)
  Seldom crush when selecting text
  Reads files opened for writing by other application
  Reads full contents in binary files (dont stops at first #0 char)
  Crush when open *.rtf files

  v0.9  //13.08.06
  RegEx now is perl5.8 compatible. You can use naming braces in Detect strings.
  Improved ACP of tag names
  RegEx replacing (Ctrl-R) support captured substrings ($1 ... $N , $<SubStringName>)
  ReadOnly state not saved in history when opened thru syn.exe
  Much faster ReplaceAll
  Bug with long time save when non CRLF line endings
  Memory leak when sort lines
  Search/Replace window is now resizable. F3, Shift-F3 & Alt-shortcut key now works in it
  Added 'Want Tabs' option for Search/Replace text areas.
  'Cancel' button added to dialog asking for save when close by Alt-F4 or system button
  Scroll CodeExplorer by MouseWheel when cursor over it
  Some CodeFolding bugs fixed (thanx DavidCl0nel)
  Ctrl-Click for open links (file://c:/) and go to function declaration

  v0.8   //4.08.06
  Crush when text selecting fixed (to copy collapse string contents it must be selected in line mode now)
  RegExp exception handling
  Shift-F3 works now when QuickSearch empty
  F3, Shift-F3 works now in QuickSearch
  Opening thru syn.exe allways opens for edit (ReadOnly=false)
  Improved speed of saving INI on USBflash
  Don't change titlebar of lister (so scripts run fine)
  Choose LineEndings (CR+LF,LF,CR) to save with
  Simple Classes and Methods recognition in CodeExplorer (based on delimeter . or ::, so methods names added to ACP without classname)
  Line comment/uncomment added (Ctrl-/)
  Ctrl-F1 now work with selected text too
  Ctrl-G work in ReadOnly
  When TrimTrailingSpaces enabled, then on saving ending spaces of all text trimmed (was only where you edit it)
  Ask for filename when create new highlighter for unknown filetype

  v0.7  //27.07.06
  CodeExplorer settings are now saved in Highlighter
  SelectionColor and ActiveLineColor for each highlighter (set color to clDefaut to use Defaults)
  Focus lost on Alt-Tab in syn.exe
  Drag files over syn.exe header
  Right margin position in options
  Open blank files
  Small fixes

  v0.6  //25.07.06
  Memory leaks fixed (thanx to Vitalik)
  StatusBar updating now in new thread with idle priority
  Ask to save file to another dir if current is not writable
  Select letters with diacritic in word on DblClick
  Bugs in QuickView mode
  Changeable font for CodeExplorer
  Hints in options dialog
  Copy to clipboard as Unicode
  Division by zero fixed on blank files
  Shift-F4 toggle case of current word

  v0.5  //20.07.06
  Parsing for Variables added to CodeExplorer
  Bookmark list added to CodeExplorer (Ctrl-Click to Del)
  QuickCode now support descriptions
  When you typed only part of QuickCode abbreviation and press Ctrl-J then menu shown
  When CodeFolding button pressed, folded text was loosed
  Not loaded .qc file when different extention
  Option to open file Maximized by default
  Fixed selected lines number counting
  Ctrl-PgDn,PgUp not moves cursor
  When in ReadOnly, keys 1..7,A,S,P,N sended to lister
  Bookmarks set by click on gutter starts from 1
  bug with form enctype attribure in INT ACP (htm.int file)
  bug with bookmark set when WordWrap enabled
  some bugs when try to edit collapsed line
  lot of small bugfixes

  v0.4  //18.07.06
  Simple CodeExplorer with detection of user functions. They are added to current ACP list.
  Open as ReadOnly by default (Space = PgDn in ReadOnly state)
  Open with WordWrap by default
  Comment/Uncomment selection
  Lost of focus sometimes fixed
  QuickCode list updated after change witout restart
  IndentGuides calculation fixed
  Position of hint over [...] changed
  UncollapseAll when Setup changes apply (else you may loose text in collapsed regions)
  Window caption updates now in syn.exe
  New shortcuts: F2-save, F4-ReadOnly, F6-Designer, F11-CodeExplorer
  Bug with Ctrl-W fixed
  Bug with Ctrl-W fixed
  Changes in SyntaxDesigner (by Vitalik):
  Bugs with copy/paste rules from/to clipboard
  Added ability to edit supported extentions, name & author
  Small bugfixes

  v0.3  //15.07.06
  Improved autoindent after {
  Improved ACP replacing
  Improved find tag on </
  Crush when close lister by own button when codepage was rereaded
  syn.exe HL list was empty if no file given
  syn.exe no ask save if empty
  Ctrl-X,C,V work now in QuickSearch
  Brackets ' and " not autocomplete inside string vars
  WinXP style on syn.exe
  Button ShowGutter changed to ShowLineNumbers
  Crush on ReadOnly files
  window pos/size & selected encoding/highlighter now saved in history
  CollapseCurrent moves cursor

  v0.2  //12.07.06
  Bug with closing TC and plugin window open
  External .exe loader for associating to F4 (thanx to atorg)
  more customizable .chm context help
  click and drag on right part of gutter = select lines
  CSS attributes added to internal HTM ACP
  improved color insertion in internal HTM ACP
  Save window pos/size for each file in history

  v0.1 //10.07.06
  PHP external macros (like in PHPExpertEditor)
  Support codepages: WIN(1251),DOS(866),KOI8,ISO(8859-5),MAC(10007),UTF-8,Unicode
  Multistring Search/Replace with Regular Expressions support
  Code folding & Indent guides
  Auto complete function names & function parameters help
  Context Help(Ctrl-F1) for PHP (needs official php_manual.chm)
  History of file positions, selection, bookmarks & wordwrap
  Quick tags <b>,<i>,<u> & <br />
  Ask to reload file, if it was modified outside
  Auto close brackets [({"'
  Auto complete { on ENTER
  Quick insert HTML form tags, Entities & Color
  Document error check by external application
  Autoclose tag on </

DEFAULT WARNING:
   This software is provided "as is" and is without warranty of  any  kind.  The
  author  of  this  software  does  not   warrant,   guarantee   or   make   any
  representations regarding the use or results of use of this software in  terms
  of reliability, accuracy or fitness for purpose. You assume the entire risk of
  direct or indirect, onsequential or inconsequential results from  the  correct
  or incorrect usage of this software even if the author has been.

ABOUT:
  By:             sepa
  Last version:   http://sepa.spb.ru/?syn
  Debug:          http://forum.wincmd.ru/viewtopic.php?t=5818
  Thanx:          Vitalik, SCHMaster, Atorg, DavidCl0nel