@@ -8,64 +8,61 @@ This is an alternative to the single-line Lua command entry.
8
8
Install this module by copying it into your * ~ /.textadept/modules/* directory or Textadept's
9
9
* modules/* directory, and then putting the following in your * ~ /.textadept/init.lua* :
10
10
11
- require('lua_repl')
11
+ ``` lua
12
+ local lua_repl = require (' lua_repl' )
13
+ ` ` ` lua
12
14
13
15
Select " Tools > Lua REPL" to open the REPL . Typing the Enter key on any line evaluates that
14
16
line , unless that line is a continuation line . In that case , when finished , select the lines
15
17
to evaluate and type Enter to evaluate the entire chunk .
16
18
17
19
Lines may be optionally prefixed with ' =' (similar to the Lua prompt ) to print a result .
18
20
19
- ## Fields defined by ` lua_repl `
20
-
21
- <a id =" lua_repl.history " ></a >
22
- ### ` lua_repl.history ` < ; table> ;
23
-
24
- Lua command history.
25
- It has a numeric ` pos ` field that indicates where in the history the user currently is.
26
-
27
- Fields:
28
-
29
- - ` pos ` :
30
-
31
- <a id =" lua_repl.keys " ></a >
32
- ### ` lua_repl.keys ` < ; table> ;
33
-
34
- Table of key bindings for the REPL.
35
-
36
-
37
- ## Functions defined by ` lua_repl `
38
-
39
21
< a id = " lua_repl.complete_lua" ></ a >
40
- ### ` lua_repl.complete_lua ` ()
22
+ ## ` lua_repl.complete_lua` ()
41
23
42
24
Shows a set of Lua code completions for the current position .
43
25
44
26
< a id = " lua_repl.cycle_history_next" ></ a >
45
- ### ` lua_repl.cycle_history_next ` ()
27
+ ## ` lua_repl.cycle_history_next` ()
46
28
47
29
Cycle forward through command history , taking into account commands with multiple lines .
48
30
49
31
< a id = " lua_repl.cycle_history_prev" ></ a >
50
- ### ` lua_repl.cycle_history_prev ` ()
32
+ ## ` lua_repl.cycle_history_prev` ()
51
33
52
34
Cycle backward through command history , taking into account commands with multiple lines .
53
35
54
36
< a id = " lua_repl.evaluate_repl" ></ a >
55
- ### ` lua_repl.evaluate_repl ` ()
37
+ ## ` lua_repl.evaluate_repl` ()
56
38
57
39
Evaluates as Lua code the current line or the text on the currently selected lines .
40
+
58
41
If the current line has a syntax error , it is ignored and treated as a line continuation .
59
42
43
+ < a id = " lua_repl.history" ></ a >
44
+ ## ` lua_repl.history`
45
+
46
+ Lua command history .
47
+
48
+ It has a numeric ` pos` field that indicates where in the history the user currently is .
49
+
50
+ Fields :
51
+
52
+ - ` pos` :
53
+
54
+ < a id = " lua_repl.keys" ></ a >
55
+ ## ` lua_repl.keys`
56
+
57
+ Table of key bindings for the REPL .
58
+
60
59
< a id = " lua_repl.open" ></ a >
61
- ### ` lua_repl.open ` (* new* )
60
+ ## ` lua_repl.open` ([ * new *= false ] )
62
61
63
62
Creates or switches to a Lua REPL .
64
- If * new* is ` true ` , creates a new REPL even if one already exists.
65
63
66
64
Parameters :
65
+ - * new * : Create a new REPL even if one already exists .
67
66
68
- - * new* : Flag that indicates whether or not to create a new REPL even if one already exists.
69
67
70
68
71
- ---
0 commit comments