Hi,
For any Lua customisation you will need to define a Lua Startup Script - see Options Menu.
My script is designed to be the one and only Lua script for any given installation of scite
1. Place this in your Global (or User) options file - see Options Menu.:-
ext.lua.startup.script=$(SciteDefaultHome)\mod\SciTEStripped.lua
ext.lua.directory=$(SciteDefaultHome)\mod
ext.lua.auto.reload=1
and optionally :
# Status Bar
statusbar.visible=0
statusbar.number=1
statusbar.text.1=\
Position : $(LineNumber):$(ColumnNumber) | Lines : $(NbOfLines) | Words : $(buffer.wordCount) | Chars : $(BufferLength) | Selected: $(SelLength) | KeyCode: $(KeyCode) | KeyIndex: $(KeyIndex) | LastFind: $(find.what)
2. Please note the expected directory structure so the script can find files:-
SciteDefaultHome\
dic Dictionaries - these are just allowed word lists for each file type
mac Macros
mod My script and external tools
tem Templates
snp Snippets
Below is a listing of these folders on my machine:
Directory of P:\MYPROG~1\EDITORS\SCITE
11/09/2020 20:45 1,149,952 SciTE32.exe - 4.4.5
11/09/2020 20:44 629,248 Lexilla.dll
11/09/2020 20:44 589,824 Scintilla.dll
14/08/2020 14:49 299 SciTEGlobal.properties
12/09/2018 22:04 1,587,200 SciTE.exe - 3.7.5
12/09/2018 21:23 1,977,344 SciLexer.dll
10 File(s) 5,935,810 bytes
Directory of P:\MYPROG~1\EDITORS\SCITE\mod
12/10/2020 19:06 7,207 SciTEStripped.properties
28/07/2020 18:14 6,955 props.api
06/08/2020 00:41 8,386 props.properties
12/10/2020 19:02 8,398 lua.api
15/10/2020 11:37 949 lua.properties
12/08/2020 19:05 128,441 SciTELua.api
06/08/2020 13:46 1,461 SciTELua.properties
12/08/2020 18:45 347 SciTE.session
29/10/2020 12:18 94,503 SciTEStripped.lua
04/05/2013 15:17 390,896 gwFindReplace.exe
18/10/2009 19:29 61,952 GetPlainText.exe
13 File(s) 709,601 bytes
Directory of P:\MYPROG~1\EDITORS\SCITE\user
29/10/2020 09:03 548 SciTE.session
13/09/2020 21:42 191 user.dic
4 File(s) 1,676 bytes
Directory of P:\MYPROG~1\EDITORS\SCITE\mac
05/08/2019 18:55 221 ListIDMandSCIconstants.lua
31/08/2020 22:10 20 phone_number.lua
26/06/2017 23:25 386 test.lua
4 File(s) 1,168 bytes
Directory of P:\MYPROG~1\EDITORS\SCITE\tem
27/04/2017 20:26 255 default.awk
24/09/2017 22:33 263 default.bat
07/10/2020 20:33 113 default.gsl
18/07/2019 20:11 513 HipandKnee.lua
11/02/2015 17:48 109 default.cpp
11/02/2015 17:48 237 default.css
11/02/2015 17:48 163 default.htm
11/02/2015 17:48 226 default.java
11/02/2015 17:48 140 default.js
11/02/2015 17:48 185 default.jsp
11/02/2015 17:48 186 default.php
11/02/2015 17:48 46 default.pl
11/02/2015 17:48 88 default.py
11/02/2015 17:48 23 default.rb
11/02/2015 17:48 140 default.tex
11/02/2015 17:48 133 default.vbs
11/02/2015 17:48 205 default.wsf
11/02/2015 17:48 445 default.xml
07/09/2020 11:25 544 SciteMacro.lua
18/09/2020 11:47 693 html.lua
19/09/2020 17:36 3,487 html_board.lua
19/09/2020 17:21 6,613 html_min_css.lua
19/09/2020 17:37 3,110 html_board_draft.lua
23 File(s) 17,917 bytes
Directory of P:\MYPROG~1\EDITORS\SCITE\dic
09/09/2020 23:31 499 lua.dic
1 File(s) 499 bytes
Directory of P:\MYPROG~1\EDITORS\SCITE\snp
07/10/2020 18:57 <DIR> html
0 File(s) 0 bytes
Directory of P:\MYPROG~1\EDITORS\SCITE\snp\html
31/08/2020 11:41 247 table.htm
3. My shortcut key defintions as extracted from the script.
["[+Ctrl+Editor"] = function() -- Toggle this header TODO go up to visible line
["[+Alt+Editor"] = function() -- Toggle child folds TODO go up to visible line
["[+Ctrl+Alt+Editor"] = function() -- Toggle all headers TODO go up to visible line
["]+Ctrl+Editor"] = function() -- Insert []
["2+Ctrl+Editor"] = function() -- Insert ""
["(+Ctrl+Editor"] = function() -- Insert ()
[")+Ctrl+Editor"] = function() -- Insert ()
["=+Ctrl+Editor"] = function() -- Run text as Lua
["?+Ctrl+Editor"] = function() -- Lua Command strip
[".+Ctrl+Editor"] = function() -- Repeat last Lua Strip Command
["?+Ctrl+Alt+Editor"] = function() -- Run Lua Macro Strip
["?+Alt+Editor"] = function() -- Create Lua Macro
["?+Alt+Shift+Editor"] = function() -- Edit Lua Macro
["#+Ctrl+Editor"] = function() -- Open your shell
["#+Ctrl+Shift+Editor"] = function()-- Open Explorer
["#+Ctrl+Alt+Editor"] = function() -- DOS Command strip
["F8+Editor"] = function() -- Show output AND focus
["F9+Editor"] = function() -- Command strip
["Up+Ctrl+Editor"] = function() -- Find previous
["Down+Ctrl+Editor"] = function() -- Find next
["Up+Ctrl+Shift+Editor"] = function()-- Block Up
["Down+Ctrl+Shift+Editor"] = function()-- Block Down
["B+Ctrl+Editor"] = function() -- Goto bol - for my mini keyboard
["B+Ctrl+Shift+Editor"] = function()-- Select to bol - for my mini keyboard
["B+Ctrl+Alt+Editor"] = function() -- Make a backup - uses **xcopy
["V+Ctrl+Alt+Editor"] = function() -- Review versions
["D+Ctrl+Editor"] = function() -- Duplicate line or block
["E+Ctrl+Editor"] = function() -- Goto eol - for my mini keyboard
["E+Ctrl+Shift+Editor"] = function()-- Select to eol - for my mini keyboard
["F+Ctrl+Editor"] = function() -- Find strip
["F+Ctrl+Alt+Editor"] = function() -- TODO Find in files Strip
["G+Ctrl+Editor"] = function() -- Goto strip
["G+Ctrl+Alt+Editor"] = function() -- TODO GIT Strip
["H+Ctrl+Editor"] = function() -- Call replace strip
["H+Ctrl+Alt+Editor"] = function() -- Replace in files **uses gwFindReplace.exe
["I+Ctrl+Alt+Editor"] = function() -- Insert Project File strip
["J+Ctrl+Editor"] = function() -- Jump to "end" or delimiter
["J+Ctrl+Shift+Editor"] = function()-- Select delimiter
["J+Ctrl+Alt+Editor"] = function() -- TODO CTAGs Strip
["K+Ctrl+Editor"] = function() -- Delete to EOL
["K+Ctrl+Shift+Editor"] = function()-- Delete to BOL
["L+Ctrl+Editor"] = function() -- Lookup definition TODO search outside SciteLua!
["L+Ctrl+Alt+Editor"] = function() -- Locations strip
["M+Ctrl+Editor"] = function() -- Mark and list occurrences
["M+Ctrl+Alt+Editor"] = function() -- Multicursor Editing
["N+Ctrl+Alt+Editor"] = function() -- Open New Editor
["O+Ctrl+Alt+Editor"] = function() -- Open Project File Strip
["R+Ctrl+Alt+Editor"] = function() -- Save and Run current file
["S+Ctrl+Alt+Editor"] = function() -- Insert Snippets
["T+Ctrl+Alt+Editor"] = function() -- New File then Insert Template Strip
["U+Ctrl+Editor"] = function() -- Unmark words
["X+Ctrl+Alt+Editor"] = function() -- Execute in shell
["Y+Ctrl+Editor"] = function() -- Yank line or block
["Z+Ctrl+Shift+Editor"] = function()-- Redo
["Tab+Ctrl+Output"] = function() -- Switch to editor
["2+Ctrl+Output"] = function() -- Insert ""
["F+Ctrl+Output"] = function() -- Search Output
["Up+Ctrl+Output"] = function() -- Find prev
["Down+Ctrl+Output"] = function() -- Find next
["H+Ctrl+Output"] = function() -- Toggle Horizontal
["N+Ctrl+Output"] = function() -- New (Clear)
["W+Ctrl+Output"] = function() -- Close
4. Some User Commands don't have shortcuts - see F9 Command Strip for a list.
Setting up spell checking requires Hunspell.exe with its libraries and dictionaries - I have used absolute paths see in the script.
Hope this helps
Kind Regards Gavin Holt
PS Will need modification for non-windows OS