Module _m.textadept.run
Module for running/executing source files. Typically, language-specific modules populate the 'compile_command', 'run_command', and 'error_detail' tables for a particular language's file extension.
Functions
| compile () |
Compiles the file as specified by its extension in the compile_command table. |
| execute (command) |
Executes the command line parameter and prints the output to Textadept. |
| goto_error (pos, line_num) |
When the user double-clicks an error message, go to the line in the file the error occured at and display a calltip with the error message. |
| run () |
Runs/executes the file as specified by its extension in the run_command table. |
Tables
Functions
- compile ()
-
Compiles the file as specified by its extension in the compile_command table.
See also:
- execute (command)
-
Executes the command line parameter and prints the output to Textadept.
Parameters
-
command: The command line string. It can have the following macros: * %(filepath) The full path of the current file. * %(filedir) The current file's directory path. * %(filename) The name of the file including extension. * %(filename_noext) The name of the file excluding extension.
- goto_error (pos, line_num)
-
When the user double-clicks an error message, go to the line in the file the error occured at and display a calltip with the error message.
Parameters
-
pos: The position of the caret.
-
line_num: The line double-clicked.
See also:
- run ()
-
Runs/executes the file as specified by its extension in the run_command table.
See also:
Tables
- compile_command
- File extensions and their associated 'compile' actions. Each key is a file extension whose value is a either a command line string to execute or a function returning one. This table is typically populated by language-specific modules.
- error_detail
- A table of error string details. Each entry is a table with the following fields: pattern: the Lua pattern that matches a specific error string. filename: the index of the Lua capture that contains the filename the error occured in. line: the index of the Lua capture that contains the line number the error occured on. message: [Optional] the index of the Lua capture that contains the error's message. A call tip will be displayed if a message was captured. When an error message is double-clicked, the user is taken to the point of error. This table is usually populated by language-specific modules.
- run_command
- File extensions and their associated 'go' actions. Each key is a file extension whose value is either a command line string to execute or a function returning one. This table is typically populated by language-specific modules.