
returns the length of EOL (default) or with "_getMode=true": LF/CRLF Local startP = editor:PositionFromLine(_line) returns position from start and end (behind last visible char) of a line SelLineData = function(self, _selPos) - _selPos: editor.SelectionStart or editor.SelectionEnd stores #pos and #line from selection position If self.lenEOL = 2 then self.eol = "\r\n" end lE = self:SelLineData(editor.SelectionEnd) lS = self:SelLineData(editor.SelectionStart) If self.boxMiddle = then self.boxMiddle = "\t" end NewText, - the text that replaces the selection Msg =, - store line numbers (start, end) for proceeding message LenEOL, - length of line break character(s) from file in editorĮol, - the end of line character(s) in this file fixed: missed adding of middle marker in first lineīoxMiddle, - property: added: detection for uncommenting if selection is wrong (starts/ends in empty line) fixed: the trailing line break from comment.end while uncommenting will not removed fixed: if selection for uncommenting is wrong, leading/trailing empty line will removed changed: minimum required selection to start block comment: 1 character added: Automatic detection for comment blocks, NO SELECTION REQUIRED to unset a comment blockĬ.before: if first selected line is empty - don't include in comment blockĬ.after: if last selected line is empty - don't include in comment blockĬ: if "1" - write result of proceeding to console, default is "0" fixed: Problem with selection starts/ends in the middle of a line or ends at the first position of the line with text added: detection (and excluding) of leading and/or trailing empty lines in selection removed: .before/after - was not very usefull fixed: If last selected line is also last line in editor, the comment.end was set in this line and so was this line deleted if has toggled. "SelectionStart" = "SelectionEnd" = ġ line with some text 1 1 line with some textĢ line with some text 2 2 line with some text The setting "3" from "au3.properties" is wrong and must be corrected. It is recommended to write all block comment settings into SciTEUser.properties. )įor toggeling its required to detect, what the user want to do. If your path has spaces don't forgot to encapsulate in string delimiters.Ĭommand.24.*=dofile $()/aĬommand.mode.24.*=subsystem:lua,savebefore:no But backslashes in the path must be masked. Otherwise copy it to a folder of your choice and change the path in the command: "dofile". If you have declared an option for user lua scripts (e.g.: "=C:\code\lua"), copy the script to this folder. (or use the default shortcut: Ctrl+Shift+Q) #~ UNSET: current line number(s) of text that was commented #~ SET : current line numbers of commented text including the lines with. #~ message for comment block set or unset - output/none (1/0), default=0 (none output) #~ If TAB should used as box.middle, set it so: is replaced by a tabulator by the script. #~ If you want characters or tab in each line of comment block (middle lines), define it here. The setting "3" from "SciTEGlobal.properties" is incorrect and must be corrected. It is recommended to write all block comment settings into "SciTEUser.properties". This means that in nested block comments there is at least one more line between two markers. Leading and trailing empty lines in selection will ignored! Ends the selection in a line with text, but at line start position so will this line ignored!
#SCITE CODA FULL#
Starts and/or ends the selection inside of a line, the selection will expanded to full line. Some text must selected (at minimum one character) The script detects automatically the "" and the corresponding "" (also if nested) and works until this line. There must exist an comment block near the cursor position (cursor inside the. But in my opinion, the current variant is much easier to handle: In the meantime, I have changed and discarded a few things. It works with any file type for which the corresponding entries in the properties are created.For toggeling its required to detect, what the user want to do. The block comment (internal: box comment) in SciTE cannot be toggled.
