aboutsummaryrefslogtreecommitdiff
path: root/modules/lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lua')
-rw-r--r--modules/lua/api11
-rw-r--r--modules/lua/tags5
2 files changed, 9 insertions, 7 deletions
diff --git a/modules/lua/api b/modules/lua/api
index 6c27b0f9..128b2d31 100644
--- a/modules/lua/api
+++ b/modules/lua/api
@@ -138,7 +138,7 @@ KEYPRESS events.KEYPRESS (string)\nEmitted when pressing a key.\nIf any handler
KEYSYMS keys.KEYSYMS (table)\nLookup table for string representations of key codes higher than 255.\nKey codes can be identified by temporarily uncommenting the `print()`\nstatements in *core/keys.lua*.
KEYWORD lexer.KEYWORD (string)\nThe token name for keyword tokens.
LABEL lexer.LABEL (string)\nThe token name for label tokens.
-LEXER_LOADED events.LEXER_LOADED (string)\nEmitted after loading a language lexer.\nThis is useful for overriding a language module's key bindings or other\nproperties since the module is not loaded when Textadept starts.\nArguments:\n\n* *`lexer`*: The language lexer's name.
+LEXER_LOADED events.LEXER_LOADED (string)\nEmitted after loading a language lexer.\nThis is useful for overriding a language module's key bindings or other\nproperties since the module is not loaded when Textadept starts.\nArguments:\n\n* _`lexer`_: The language lexer's name.
LINUX _G.LINUX (bool)\nWhether or not Textadept is running on Linux.
MARGINOPTION_NONE buffer.MARGINOPTION_NONE (number, Read-only)\n
MARGINOPTION_SUBLINESELECT buffer.MARGINOPTION_SUBLINESELECT (number, Read-only)\n
@@ -482,7 +482,7 @@ collectgarbage _G.collectgarbage([opt [, arg]])\nThis function is a generic inte
colorselect ui.dialogs.colorselect(options)\nPrompts the user with a color selection dialog defined by dialog options\ntable *options*, returning the color selected.\nIf the user canceled the dialog, returns `nil`.\n@param options Table of key-value option pairs for the option select dialog.\n\n * `title`: The dialog's title text.\n * `color`: The initially selected color as either a number in "0xBBGGRR"\n format, or as a string in "#RRGGBB" format.\n * `palette`: The list of colors to show in the dialog's color palette.\n Up to 20 colors can be specified as either numbers in "0xBBGGRR" format\n or as strings in "#RRGGBB" format. If `true` (no list was given), a\n default palette is shown.\n * `string_output`: Return the selected color in string "#RRGGBB" format\n instead of numeric "0xBBGGRR" format. The default value is `false`.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n@usage ui.dialogs.colorselect{title = 'Foreground color', color = 0x000000,\n palette = {'#000000', 0x0000FF, '#00FF00', 0xFF0000}}\n@return selected color
colourise buffer.colourise(buffer, start_pos, end_pos)\nInstructs the lexer to style and mark fold points in the range of text\nbetween *start_pos* and *end_pos*.\nIf *end_pos* is `-1`, styles and marks to the end of the buffer.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to\n process.\n@param end_pos The end position of the range of text in *buffer* to process,\n or `-1` to process from *start_pos* to the end of *buffer*.
column buffer.column (table, Read-only)\nTable of column numbers (taking tab widths into account) for positions\nstarting from zero.\nMulti-byte characters count as single characters.
-command_entry ui.command_entry (module)\nTextadept's Command Entry.
+command_entry ui.command_entry (module)\nTextadept's Command Entry.\nIt supports multiple modes that each have their own functionality, such as\nrunning Lua code, searching for text incrementally, and filtering text\nthrough shell commands.
comment_string textadept.editing.comment_string (table)\nMap of lexer names to line comment strings for programming languages, used by\nthe `block_comment()` function.\nKeys are lexer names and values are either the language's line comment\nprefixes or block comment delimiters separated by a '|' character.\n@see block_comment
compile textadept.run.compile(filename)\nCompiles file *filename* or the current file using an appropriate shell\ncommand from the `compile_commands` table.\nThe shell command is determined from the file's filename, extension, or\nlanguage in that order.\nEmits `COMPILE_OUTPUT` events.\n@param filename Optional path to the file to compile. The default value is\n the current file's filename.\n@see compile_commands\n@see _G.events
compile_commands textadept.run.compile_commands (table)\nMap of filenames, file extensions, and lexer names to their associated\n"compile" shell command line strings or functions that return such strings.\nCommand line strings may have the following macros:\n\n + `%f`: The file's name, including its extension.\n + `%e`: The file's name, excluding its extension.\n + `%d`: The file's directory path.\n + `%p`: The file's full path.\n\nFunctions may also return a working directory to operate in. By default, it\nis the current file's parent directory.
@@ -550,7 +550,7 @@ edge_column buffer.edge_column (number)\nThe column number to mark long lines at
edge_mode buffer.edge_mode (number)\nThe long line mark mode.\n\n* `buffer.EDGE_NONE`\n Long lines are not marked.\n* `buffer.EDGE_LINE`\n Draw a single vertical line whose color is `buffer.edge_colour` at\n column `buffer.edge_column`.\n* `buffer.EDGE_BACKGROUND`\n Change the background color of text after column `buffer.edge_column`\n to `buffer.edge_colour`.\n* `buffer.EDGE_MULTILINE`\n Draw vertical lines whose colors and columns are defined by calls to\n `buffer:multi_edge_add_line()`.
edit_toggle_overtype buffer.edit_toggle_overtype(buffer)\nToggles `buffer.overtype`.\n@param buffer A buffer.
editing textadept.editing (module)\nEditing features for Textadept.
-editing_keys ui.command_entry.editing_keys (table)\nA metatable with typical platform-specific key bindings for text entries.\nThis metatable may be used to add basic editing keys to command entry modes.\nIt is automatically added to command entry modes unless a metatable was\npreviously set.
+editing_keys ui.command_entry.editing_keys (table)\nA metatable with typical platform-specific key bindings for text entries.\nThis metatable may be used to add basic editing and movement keys to command\nentry modes. It is automatically added to command entry modes unless a\nmetatable was previously set.
embed lexer.embed(lexer, child, start_rule, end_rule)\nEmbeds child lexer *child* in parent lexer *lexer* using patterns\n*start_rule* and *end_rule*, which signal the beginning and end of the\nembedded lexer, respectively.\n@param lexer The parent lexer.\n@param child The child lexer.\n@param start_rule The pattern that signals the beginning of the embedded\n lexer.\n@param end_rule The pattern that signals the end of the embedded lexer.\n@usage html:embed(css, css_start_rule, css_end_rule)\n@usage html:embed(lex, php_start_rule, php_end_rule) -- from php lexer
emit events.emit(event, ...)\nSequentially calls all handler functions for event *event* with the given\narguments.\n*event* may be any arbitrary string and does not need to have been previously\ndefined. If any handler explicitly returns `true` or `false`, `emit()`\nreturns that value and ceases to call subsequent handlers. This is useful for\nstopping the propagation of an event like a keypress after it has been\nhandled.\n@param event The string event name.\n@param ... Arguments passed to the handler.\n@usage events.emit('my_event', 'my message')\n@return `true` or `false` if any handler explicitly returned such; `nil`\n otherwise.
empty_undo_buffer buffer.empty_undo_buffer(buffer)\nDeletes the undo and redo history.\n@param buffer A buffer.
@@ -562,7 +562,6 @@ end_styled buffer.end_styled (number, Read-only)\nThe current styling position o
end_undo_action buffer.end_undo_action(buffer)\nEnds a sequence of actions to be undone or redone as a single action.\n@param buffer A buffer.
ensure_visible buffer.ensure_visible(buffer, line)\nEnsures line number *line* is visible by expanding any fold points hiding it.\n@param buffer A buffer.\n@param line The line number in *buffer* to ensure visible.
ensure_visible_enforce_policy buffer.ensure_visible_enforce_policy(buffer, line)\nEnsures line number *line* is visible by expanding any fold points hiding it\nbased on the vertical caret policy previously defined in\n`buffer.set_visible_policy()`.\n@param buffer A buffer.\n@param line The line number in *buffer* to ensure visible.
-enter_mode ui.command_entry.enter_mode(mode, lexer, height)\nOpens the command entry in key mode *mode*, highlighting text with lexer name\n*lexer*, and displaying *height* number of lines at a time.\nKey bindings will be looked up in `keys[mode]` instead of `keys`. The `Esc`\nkey exits the current mode, closes the command entry, and restores normal key\nlookup.\nThis function is useful for binding keys to enter a command entry mode.\n@param mode The key mode to enter into, or `nil` to exit the current mode.\n@param lexer Optional string lexer name to use for command entry text. The\n default value is `'text'`.\n@param height Optional number of lines to display in the command entry. The\n default value is `1`.\n@usage keys['ce'] =\n function() ui.command_entry.enter_mode('command_entry') end\n@see _G.keys.MODE
eol_mode buffer.eol_mode (number)\nThe current end of line mode. Changing the current mode does not convert\nany of the buffer's existing end of line characters.\nUse `buffer.convert_eols()` to do so.\n\n* `buffer.EOL_CRLF`\n Carriage return with line feed ("\r\\n").\n* `buffer.EOL_CR`\n Carriage return ("\r").\n* `buffer.EOL_LF`\n Line feed ("\\n").\n\nThe default value is `buffer.EOL_CRLF` on Windows platforms,\n`buffer.EOL_LF` otherwise.
error _G.error(message [, level])\nTerminates the last protected function called and returns `message`\nas the error object. Function `error` never returns.\n\nUsually, `error` adds some information about the error position at the\nbeginning of the message, if the message is a string. The `level` argument\nspecifies how to get the error position. With level 1 (the default), the\nerror position is where the `error` function was called. Level 2 points the\nerror to where the function that called `error` was called; and so on.\nPassing a level 0 avoids the addition of error position information to the\nmessage.
error_patterns textadept.run.error_patterns (table)\nMap of file extensions and lexer names to their associated lists of string\npatterns that match warning and error messages emitted by compile and run\ncommands for those file extensions and lexers.\nPatterns match single lines and contain captures for a filename, line number,\ncolumn number (optional), and warning or error message (optional).\nDouble-clicking a warning or error message takes the user to the source of\nthat warning/error.\nNote: `(.-)` captures in patterns are interpreted as filenames; `(%d+)`\ncaptures are interpreted as line numbers first, and then column numbers; and\nany other capture is treated as warning/error message text.
@@ -592,12 +591,12 @@ find_in_files ui.find.find_in_files(dir, filter)\nSearches directory *dir* or th
find_in_files_filters ui.find.find_in_files_filters (table)\nMap of file paths to filters used in `ui.find.find_in_files()`.\n@see find_in_files
find_in_files_timeout ui.find.find_in_files_timeout (number)\nThe approximate interval in seconds between prompts for continuing an\n"In files" search.\nThe default value is 10 seconds.
find_incremental ui.find.find_incremental(text, next, anchor)\nBegins an incremental search using the command entry if *text* is `nil`.\nOtherwise, continues an incremental search by searching for the next or\nprevious instance of string *text*, depending on boolean *next*.\n*anchor* indicates whether or not to search for *text* starting from the\ncaret position instead of the position where the incremental search began.\nOnly the `match_case` find option is recognized. Normal command entry\nfunctionality is unavailable until the search is finished or by pressing\n`Esc` (`⎋` on Mac OSX | `Esc` in curses).\n@param text The text to incrementally search for, or `nil` to begin an\n incremental search.\n@param next Flag indicating whether or not the search direction is forward.\n@param anchor Optional flag indicating whether or not to start searching from\n the caret position. The default value is `false`.
+find_incremental_keys ui.find.find_incremental_keys (table)\nTable of key bindings used when searching for text incrementally.
find_label_text ui.find.find_label_text (string, Write-only)\nThe text of the "Find" label.\nThis is primarily used for localization.
find_next ui.find.find_next()\nMimics pressing the "Find Next" button.
find_next_button_text ui.find.find_next_button_text (string, Write-only)\nThe text of the "Find Next" button.\nThis is primarily used for localization.
find_prev ui.find.find_prev()\nMimics pressing the "Find Prev" button.
find_prev_button_text ui.find.find_prev_button_text (string, Write-only)\nThe text of the "Find Prev" button.\nThis is primarily used for localization.
-finish_mode ui.command_entry.finish_mode(f)\nExits the current key mode, closes the command entry, and calls function *f*\n(if given) with the command entry's text as an argument.\nThis is useful for binding keys to exit a command entry mode and perform an\naction with the entered text.\n@param f Optional function to call. It should accept the command entry text\n as an argument.\n@usage keys['\\n'] =\n function() return ui.command_entry.finish_mode(ui.print) end
first_visible_line buffer.first_visible_line (number)\nThe line number of the line at the top of the view, starting from zero.
float lexer.float (pattern)\nA pattern that matches a floating point number.
floor math.floor(x)\nReturns the largest integral value smaller than or equal to `x`.
@@ -886,6 +885,7 @@ para_down_extend buffer.para_down_extend(buffer)\nMoves the caret down one parag
para_up buffer.para_up(buffer)\nMoves the caret up one paragraph.\nParagraphs are surrounded by one or more blank lines.\n@param buffer A buffer.
para_up_extend buffer.para_up_extend(buffer)\nMoves the caret up one paragraph, extending the selected text to the new\nposition.\nParagraphs are surrounded by one or more blank lines.\n@param buffer A buffer.
paste buffer.paste(buffer)\nPastes the clipboard's contents into the buffer, replacing any selected text\naccording to `buffer.multi_paste`.\n@param buffer A buffer.
+paste_reindent textadept.editing.paste_reindent()\nPastes the text from the clipboard, taking into account the buffer's\nindentation settings and the indentation of the current and preceding lines.
path lexer.path (string)\nThe path used to search for a lexer to load.\nIdentical in format to Lua's `package.path` string.\nThe default value is `package.path`.
path package.path (string)\nThe path used by `require` to search for a Lua loader.\nAt start-up, Lua initializes this variable with the value of the\nenvironment variable `LUA_PATH_5_3` or the environment variable `LUA_PATH`\nor with a default path defined in `luaconf.h`, if those environment\nvariables are not defined. Any "`;;`" in the value of the environment\nvariable is replaced by the default path.
patterns textadept.file_types.patterns (table)\nMap of first-line patterns to their associated lexer names.\nEach pattern is matched against the first line in the file.
@@ -976,6 +976,7 @@ ruby _G.snippets.ruby (table)\nContainer for Ruby-specific snippets.
ruby _M.ruby (module)\nThe ruby module.\nIt provides utilities for editing Ruby code.
run textadept.run (module)\nCompile and run source code files with Textadept.\nLanguage modules may tweak the `compile_commands`,\n`run_commands`, and `error_patterns` tables for particular languages.\nThe user may tweak `build_commands` for particular projects.
run textadept.run.run(filename)\nRuns file *filename* or the current file using an appropriate shell command\nfrom the `run_commands` table.\nThe shell command is determined from the file's filename, extension, or\nlanguage in that order.\nEmits `RUN_OUTPUT` events.\n@param filename Optional path to the file to run. The default value is the\n current file's filename.\n@see run_commands\n@see _G.events
+run ui.command_entry.run(f, mode_keys, lexer, height)\nOpens the command entry, subjecting it to any key bindings defined in table\n*mode_keys*, highlighting text with lexer name *lexer*, and displaying\n*height* number of lines at a time, and then when the `Enter` key is pressed,\ncloses the command entry and calls function *f* (if non-`nil`) with the\ncommand entry's text as an argument.\nBy default with no arguments given, opens a Lua command entry.\nThe command entry does not respond to Textadept's default key bindings, but\ninstead to the key bindings defined in *mode_keys* and in\n`ui.command_entry.editing_keys`.\n@param f Optional function to call upon pressing `Enter` in the command\n entry, ending the mode. It should accept the command entry text as an\n argument.\n@param mode_keys Optional table of key bindings to respond to. This is in\n addition to the basic editing and movement keys defined in\n `ui.command_entry.editing_keys`.\n `Esc` and `Enter` are automatically defined to cancel and finish the\n command entry, respectively.\n This parameter may be omitted completely.\n@param lexer Optional string lexer name to use for command entry text. The\n default value is `'text'`.\n@param height Optional number of lines to display in the command entry. The\n default value is `1`.\n@usage ui.command_entry.run(ui.print)\n@see editing_keys
run_commands textadept.run.run_commands (table)\nMap of filenames, file extensions, and lexer names to their associated "run"\nshell command line strings or functions that return strings.\nCommand line strings may have the following macros:\n\n + `%f`: The file's name, including its extension.\n + `%e`: The file's name, excluding its extension.\n + `%d`: The file's directory path.\n + `%p`: The file's full path.\n\nFunctions may also return a working directory to operate in. By default, it\nis the current file's parent directory.
run_in_background textadept.run.run_in_background (bool)\nRun shell commands silently in the background.\nThis only applies when the message buffer is open, though it does not have\nto be visible.\nThe default value is `false`.
running coroutine.running()\nReturns the running coroutine plus a boolean, true when the running coroutine\nis the main one.
diff --git a/modules/lua/tags b/modules/lua/tags
index 9e9193fe..95fe1e19 100644
--- a/modules/lua/tags
+++ b/modules/lua/tags
@@ -570,7 +570,6 @@ end_styled _ 0;" F class:buffer
end_undo_action _ 0;" f class:buffer
ensure_visible _ 0;" f class:buffer
ensure_visible_enforce_policy _ 0;" f class:buffer
-enter_mode _ 0;" f class:ui.command_entry
eol_mode _ 0;" F class:buffer
error _ 0;" f
error_patterns _ 0;" t class:textadept.run
@@ -600,12 +599,12 @@ find_in_files _ 0;" f class:ui.find
find_in_files_filters _ 0;" t class:ui.find
find_in_files_timeout _ 0;" F class:ui.find
find_incremental _ 0;" f class:ui.find
+find_incremental_keys _ 0;" t class:ui.find
find_label_text _ 0;" F class:ui.find
find_next _ 0;" f class:ui.find
find_next_button_text _ 0;" F class:ui.find
find_prev _ 0;" f class:ui.find
find_prev_button_text _ 0;" F class:ui.find
-finish_mode _ 0;" f class:ui.command_entry
first_visible_line _ 0;" F class:buffer
float _ 0;" F class:lexer
floor _ 0;" f class:math
@@ -894,6 +893,7 @@ para_down_extend _ 0;" f class:buffer
para_up _ 0;" f class:buffer
para_up_extend _ 0;" f class:buffer
paste _ 0;" f class:buffer
+paste_reindent _ 0;" f class:textadept.editing
path _ 0;" F class:lexer
path _ 0;" F class:package
patterns _ 0;" t class:textadept.file_types
@@ -983,6 +983,7 @@ ruby _ 0;" m class:_M
ruby _ 0;" t class:keys
ruby _ 0;" t class:snippets
run _ 0;" f class:textadept.run
+run _ 0;" f class:ui.command_entry
run _ 0;" m class:textadept
run_commands _ 0;" t class:textadept.run
run_in_background _ 0;" F class:textadept.run