isetrx.blogg.se

Autoit scite clear line
Autoit scite clear line














TabReplace_FileInSciTE(4) - If required: Change the TAB size here TabReplace_FileInSciTE = function(_tabsize) Replaces all TAB in the file currently open in SciTE _line = _line:gsub('\t', function() idx = idx +1 return tTab end) PosTab = _line:find('\t', posTab +1) - find next TAB SRep = s:rep(iLen) - create replacement string SumLen = sumLen + iLen -1 - total length of the replacements ILen = (_tabsize - ((posTab + sumLen -1) % _tabsize)) calculation replacement string, taking into account characters to be inserted Local tTab, s, sRep, iLen, sumLen =, ' ', '', 0, 0 _tabsize = _tabsize or 4 - default TAB width If posTab = nil then return _line, 0 end - no TAB included If _line = '' then return _line, 0 end - only a empty string If _line:find('^+$') then return _line, 0 end - only a line break TabReplace_Line = function(_line, _tabsize) Out.: The line, with TAB replaced if necessary, and the number of replacements. : _tabsize TAB size in number of characters. In.: _line A line of text whose TAB are to be replaced by spaces. In the opened document, all TAB will be replaced by the number of spaces corresponding to the TAB position in the line.Then change the last line in this script to: TabReplace_FileInSciTE(props) # Without this property or with empty value "4" is used. # The currently used tab.size, which is replaced by spaces Or add a property to your "SciTEUser.properties" to have more flexibility: In this script (last line), "TabReplace_FileInSciTE(2)" or "TabReplace_FileInSciTE(8)". If your sources has different values for TAB width, you can modify the command call.

AUTOIT SCITE CLEAR LINE FREE

(find a free command number, in example is "49" used, and a free shortcut)Ĭommand.name.49.*=Replace TAB with spacesĬommand.49.*=dofile "YOUR-PATH/a"Ĭommand.mode.49.*=subsystem:lua,savebefore:no

  • New entry in your "SciTEUser.properties".
  • But other values are also possible, details about this and the installation and usage are at the beginning of the script. By default a tab width of 4 characters is used.

    autoit scite clear line

    It replaces all tabs with the appropriate number of spaces in the document opened in SciTE. I have created the following Lua script for this purpose. Thus, it is better to replace all tabs with spaces in the correct position before posting. GitHub), they are ripped from their formatting. When posting scripts to platforms that use different tab settings (e.g. Openpath.$(au3)=$(SciteDefaultHome)\.\include C:\Program Files\AutoIt3 Here is mi SciTEUser.properties:įont.base=font:Verdana,size:10,$(font.override) I've tried adding check.if.already.open=0 at the end but it didn't work. au3 files, from outside the editor, they should now open in a new window. In the newly opened SciTEUser.properties file, add (or modify) the following line BELOW the "DO NOT CHANGE" section: Click on "Options - > Open User Options File"














    Autoit scite clear line