8AleX8
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору ZiLot Цитата: все равно ИМХО недостаточно удобно... | В очередной раз внимательно перечитав документацию command.name.number.filepattern command.number.filepattern command.is.filter.number.filepattern command.subsystem.number.filepattern command.save.before.number.filepattern command.input.number.filepattern command.replace.selection.number.filepattern command.quiet.number.filepattern | Extra commands can be added to the Tools menu. For example to include the 'astyle' indenter, the properties file could contain command.name.0.*.cc=Indent command.0.*.cc=astyle -taO $(FileNameExt) command.is.filter.0.*.cc=1 The first line defines the string that will appear in the Tools menu (immediately below 'Go'. The second line is the command string, similar to those of the compile, build, and go commands. The optional command.is.filter property states that the command modifies the current file so it may need to be read in after performing the command if load.on.activate is set. The subsystem determines how the command is executed on Windows. 0, the default is for command line programs, 1 for programs which create their own windows, 2 for running by using ShellExecute, 3 for running in an internal extension or director extension, 4 for running HtmlHelp on Windows, and 5 for running WinHelp on Windows. When using subsystem 4 or 5, the command has two parts separated by ! with the first part being the topic to search for and the second the name of the help file. If command.save.before is set to 1, SciTE automatically saves the file before execution. If it is set to 2, SciTE will not save the file, otherwise SciTE asks you. On Windows, the optional command.input property specifies text that will be piped to the command. This may reference other properties; for example, command.input.0.*.cc=$(CurrentSelection) would pipe the current selection to the command processes. The command.input property is only supported for subsystem 0 (command line programs). On Windows, the optional command.replace.selection can be used to specify that the command output should replace the current selection (or be inserted at the cursor location, if there is no selection). This property has three available settings: 0, the default, means do not replace the selection. 1 means replace the selection when the command finishes. 2 means replace the selection only if the command finishes with an exit code of 0. If the user cancels the command via "Tools / Stop Executing", the selection will not be replaced even in mode 1. Note, commands run asynchronously, so you are not prevented from modifying the document or even switching buffers while a command is running. However, please bear in mind that command.replace.selection will send the output to whatever window is active when the command completes. A final command property that is currently supported only on windows is command.quiet. A value of 1 indicates that the command I/O should not be echoed to the output pane. This may be useful in combination with command.input and command.replace.selection. If the text of a command starts with '*' then the Parameters dialog is displayed to prompt for parameters before executing the command. The initial '*' is not included in the command that is executed. | И Цитата: Command line arguments Command line arguments to SciTE include file names, commands and properties. Commands and properties are preceded by "-" and are differentiated by the use in commands of ':' as the first character that is not '.' or alphabetic. Properties use the syntax used in property set files and override any properties set in property files. If there is no value given for a property, it is set to 1. Double quotes may be placed around arguments that contain spaces but they must be placed around the whole argument, not just around a file name, so "-open:x y.txt" works but -open:"x y.txt" doesn't. On Linux, the standard shell quoting is available. The "-p" argument causes SciTE to print the file and then exit. For example, SciTE "-font.base=font:MS Gothic,size:11" -save.recent ScintillaGTK.cxx starts SciTE, opens ScintillaGTK.cxx, loads the recent file list, and uses 11 point MS Gothic as the base font. A group of properties can be saved as a property set file (with the extension ".properties") and the import command used on the command line: SciTE "-import c:\os\web_work" SciTEDoc.html A few commands are currently available although this will expand in the future. These commands are available: CommandArgument close: cwd:change working directory find:search text goto:line number[,column number] open:file name quit: replaceall:search text\000replacement text saveas:file name Commands use C style escape sequences which include: Escape SequenceMeaning \\backslash \abell \bbackspace \fform feed \nnew line \rcarriage return \ttab \vvertical tab \<ooo>octal number specified by 1, 2, or 3 digits \x<hh>hexadecimal number specified by 2 digits The following opens /big/icon.txt: SciTE -open:/big/icon.txt On Windows, the following opens C:\Program Files\SciTE\SciTEDoc.html and goes to the 123th line: SciTE "-open:C:\\Program Files\\SciTE\\SciTEDoc.html" -goto:123 Command line arguments are evaluated left to right in two phases because opening files requires the user interface to be available and there is also a need to set some user interface properties before the user interface is displayed. The first phase process arguments until just before the first file name would be opened. The second phase processes the remaining arguments. So, if you need to perform e.g. a find: or a goto: command on a file, you must put the command after the filename, to allow SciTE to open the file before performing the command. | Добавил в SciteUser.proprties следующие комманды для переключения кодировок Русский и Иврит: Цитата: #Russian Encoding Command command.name.0.*=Russian command.0.*=$(SciteDefaultHome)\SciTE.exe -character.set=204 -chars.accented=АаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя -code.page=1251 command.is.filter.0.*=1 command.subsystem.0.*=2 #----------------------------------------- #Hebrew Encoding Command command.name.1.*=Hebrew command.1.*=$(SciteDefaultHome)\SciTE.exe -character.set=177 command.is.filter.1.*=1 command.subsystem.1.*=2 | ВНИМАНИЕ Это будит роботать только если в SciteUser.properties файле также установленны: Цитата: check.if.already.open=1 load.on.activate=1 | В результате в меню Tools появляются две комманды Russian и Hebrew , которые также можно запустить с помощью Ctrl+0 и Ctrl+1. My current SciteUser.properties | Всего записей: 1813 | Зарегистр. 11-12-2001 | Отправлено: 22:36 09-09-2003 | Исправлено: 8AleX8, 09:04 29-09-2003 |
|