Difference between revisions of "Manual:Script Editor"

From Mudlet
Jump to navigation Jump to search
m (Zooka moved page Manual:Editor to Manual:Script Editor: lua code editor is part of the script editor, be more inclusive and descriptive about whole screen)
(add screenshot of script editor)
Line 1: Line 1:
 
{{TOC right}}
 
{{TOC right}}
 
{{#description2:Manual on the editor and shortcuts available to navigate, select and edit scripts, triggers, aliases, etc.}}
 
{{#description2:Manual on the editor and shortcuts available to navigate, select and edit scripts, triggers, aliases, etc.}}
= Editor =
+
= Script Editor =
  
== Editor shortcuts ==
+
The Script editor screen (default key: Alt+E) provides access to Mudlet's automation features such as; [[Manual:Trigger Engine|triggers]], [[Manual:Aliases|aliases]], [[Manual:Scripting|scripts]], [[Manual:Timers|timers]], [[Manual:Introduction#Keybindings|keybindings]], [[Manual:Using Variables in Mudlet|variables]] and [[Manual:Introduction#Buttons|buttons]].  It also has an [[Manual:Introduction#Runtime_errors_aka_Errors_View|error console]], statistics generator and debug console.
 +
 
 +
== Lua Code Editor ==
 +
 
 +
Edit Lua scripts by choosing Scripts (CTRL+3).  Mudlet runs Lua 5.1 and can access any [[Compiling_Mudlet#Lua_.26_Luarocks|Lua libraries]] install on your system.  The API can be found [[Manual:Lua_Functions|here]].
 +
 
 +
[[File:Lua-code-editor.png|thumb|center|Editing a Lua script]]
 +
 
 +
=== Editor shortcuts ===
  
 
The following shortcuts are available in the Lua code editor:
 
The following shortcuts are available in the Lua code editor:

Revision as of 07:20, 23 June 2024

Script Editor

The Script editor screen (default key: Alt+E) provides access to Mudlet's automation features such as; triggers, aliases, scripts, timers, keybindings, variables and buttons. It also has an error console, statistics generator and debug console.

Lua Code Editor

Edit Lua scripts by choosing Scripts (CTRL+3). Mudlet runs Lua 5.1 and can access any Lua libraries install on your system. The API can be found here.

Editing a Lua script

Editor shortcuts

The following shortcuts are available in the Lua code editor:

Navigation shortcuts
Ctrl+Tab Focus next section
Ctrl+Shift+Tab Focus previous section
Ctrl+S Save current item (trigger, alias, etc.)
Ctrl+Shift+S Save complete profile
Ctrl+1 Show trigger editor
Ctrl+2 Show aliases editor
Ctrl+3 Show scripts editor
Ctrl+4 Show timers editor
Ctrl+5 Show keys editor
Ctrl+6 Show variables editor
Ctrl+7 Show buttons editor
Ctrl+8 Show error log console
Ctrl+9 Display statistics in main window
Ctrl+0 Open central debug console window


Selection shortcuts
Ctrl+A Select all text
Ctrl+Left click Add cursors
Ctrl+Alt+Up Extend custors up
Ctrl+Alt+Down Extend custors down
Esc Switch to one cursor
Ctrl+D Select words at the cursor
Ctrl+L Select next lines
Ctrl+Shift+L Select previous lines
Ctrl+F Opens the script editor's FIND dialog.
F3 Moves to the next FIND result.
Shift+F3 Moves to the previous FIND result.


Editing shortcuts
Ctrl+] Indent right
Ctrl+[ Indent left
Ctrl+Shift+D Duplicate
Ctrl+/ Toggle selection comment
Alt+Backspace Delete rest of the word left
Ctrl+Backspace
Shift+Backspace
Alt+Delete Delete rest of the word right
Ctrl+Delete
Shift+Delete
Ctrl+R Toggle read-only