LnzScript Editor
The editor that comes with LnzScript is a custom build of the code editor called SciTE. I've added tools and autocompletion to make it easier to work with LnzScript .js files.
Commonly Used Features:
The keyboard shortcut Ctrl+D duplicates the current line, without changing the clipboard.
The keyboard shortcut Ctrl+L deletes the current line.
Use Ctrl+Tab and Ctrl+Shift+Tab to switch between tabs.
Ctrl+Q comments out the current line. Note that it enters the characters //~, and not //, which distinguishes between disabled code and actual comments. Pressing Ctrl+Q again uncomments.
Ctrl+H is used to replace. Replace in Selection is useful. Regular expressions are available, and matched groups can be referenced with \1 and so on.
Ctrl+Shift+F opens a Find in Files dialog.
F8 allows you to specify command-line arguments to send to the script. Lnzscript files can use the
argv
variable to refer to them.Configuration files offer many options, and the user.shortcuts setting in Global Options can set custom keyboard shortcuts.
Special Features:
- Run before saving! Let's say you are creating a one-time script to, say, sort some words alphabetically. Unlike other editors, you can run a LnzScript file without explicitly saving it to disk, which saves you time. Simply type in some code and hit F5 - the results are right there in the output pane. (This only pertains to Untitled documents).
- There's a special Documentation-viewer window that can be opened from the Help menu. Double-clicking on a function in this window inserts it into the current script.
- If you save a .js script, type
for(23
on a new line and press Ctrl+0. The text is expanded withfor(var i=0; i<23;i++)
, a for loop repeating 23 times. - Other tools can be added. Open "js Options" or "python Options" from the Options menu and add a command, following the example of the existing commands. Keyboard shortcuts can also be specified.
Python
- On installation, Lnz Scite assumes the Python directory is
C:\python25
. Try creating a simple Python script likeprint('hello')
, save astest.py
, and press F5. If the output pane says the program cannot be found, you should open "python Options" from the Options menu. In this file, change the value ofpythondirectory
as appropriate (to whatever Python directory exists, such asC:\python27
) and save changes.
- On installation, Lnz Scite assumes the Python directory is
Other Notes
There is an output pane to the right of the editor. Also, in a Python script, you can read typed into this window with code like
raw_input()
. However, note that characters are sent as the key is pressed, and so if you type "abcc{backspace}d" the program will see "abccd" instead of the "abcd" you intended.Auto-completion is enabled: if you create a new document and begin to type
Process.
, an autocomplete box appears to show possible completions. If you typeprint('hello')
and press F5, the results of the script are shown in the output pane to the right. (To disable autocomplete, open "js Options" from the Options menu and setenable_js_autocomplete
to 0).For extensive information about SciTE, see here.
To see LnzScript version history, see here.
Back