aboutsummaryrefslogtreecommitdiff
path: root/modules/lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lua')
-rw-r--r--modules/lua/api8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/lua/api b/modules/lua/api
index 2585615d..b37a0838 100644
--- a/modules/lua/api
+++ b/modules/lua/api
@@ -533,7 +533,7 @@ dialogs ui.dialogs (module)\nProvides a set of interactive dialog prompts for us
difftime os.difftime(t2, t1)\nReturns the difference, in seconds, from time `t1` to time `t2` (where the\ntimes are values returned by `os.time`). In POSIX, Windows, and some other\nsystems, this value is exactly `t2`*-*`t1`.
digit lexer.digit (pattern)\nA pattern that matches any digit ('0'-'9').
dir lfs.dir(path)\nLua iterator over the entries of a given directory. Each time the iterator is\ncalled with dir_obj it returns a directory entry's name as a string, or nil\nif there are no more entries. You can also iterate by calling dir_obj:next(),\nand explicitly close the directory before the iteration finished with\ndir_obj:close(). Raises an error if path is not a directory.
-dir_foreach lfs.dir_foreach(dir, f, filter, n, include_dirs, level)\nIterates over all files and sub-directories (up to *n* levels deep) in\ndirectory *dir*, calling function *f* with each file found.\nFiles passed to *f* do not match any pattern in string or table *filter*\n(or `lfs.default_filter` when *filter* is `nil`). A filter table contains:\n\n + Lua patterns that match filenames to exclude.\n + Optional `folders` sub-table that contains patterns matching directories\n to exclude.\n + Optional `extensions` sub-table that contains raw file extensions to\n exclude.\n + Optional `symlink` flag that when `true`, excludes symlinked files (but\n not symlinked directories).\n + Optional `folders.symlink` flag that when `true`, excludes symlinked\n directories.\n\nAny filter patterns starting with '!' include files and directories that\nmatch the pattern that follows. This is useful for filtering out all files\nand directories except a select few.\n@param dir The directory path to iterate over.\n@param f Function to call with each full file path found. If *f* returns\n `false` explicitly, iteration ceases.\n@param filter Optional filter for files and directories to exclude. The\n default value is `lfs.default_filter`.\n@param n Optional maximum number of directory levels to descend into.\n The default value is `nil`, which indicates no limit.\n@param include_dirs Optional flag indicating whether or not to call *f* with\n directory names too. Directory names are passed with a trailing '/' or '\',\n depending on the current platform.\n The default value is `false`.\n@param level Utility value indicating the directory level this function is\n at. This value is used and set internally, and should not be set otherwise.\n@see filter
+dir_foreach lfs.dir_foreach(dir, f, filter, n, include_dirs, level)\nIterates over all files and sub-directories (up to *n* levels deep) in\ndirectory *dir*, calling function *f* with each file found.\nString or list *filter* determines which files to pass through to *f*, with\nthe default filter being `lfs.default_filter`. A filter consists of Lua\npatterns that match file and directory paths to include or exclude. Exclusive\npatterns begin with a '!'. If no inclusive patterns are given, any path is\ninitially considered. As a convenience, file extensions can be specified\nliterally instead of as a Lua pattern (e.g. '.lua' vs. '%.lua$'), and '/'\nalso matches the Windows directory separator ('[/\\]' is not needed).\n@param dir The directory path to iterate over.\n@param f Function to call with each full file path found. If *f* returns\n `false` explicitly, iteration ceases.\n@param filter Optional filter for files and directories to include and\n exclude. The default value is `lfs.default_filter`.\n@param n Optional maximum number of directory levels to descend into.\n The default value is `nil`, which indicates no limit.\n@param include_dirs Optional flag indicating whether or not to call *f* with\n directory names too. Directory names are passed with a trailing '/' or '\',\n depending on the current platform.\n The default value is `false`.\n@param level Utility value indicating the directory level this function is\n at. This value is used and set internally, and should not be set otherwise.\n@see filter
disconnect events.disconnect(event, f)\nRemoves function *f* from the set of handlers for event *event*.\n@param event The string event name.\n@param f The Lua function connected to *event*.\n@see connect
doc_line_from_visible buffer.doc_line_from_visible(buffer, display_line)\nReturns the actual line number of displayed line number *display_line*,\ntaking hidden lines into account.\nIf *display_line* is less than or equal to zero, returns `0`. If\n*display_line* is greater than or equal to the number of displayed lines,\nreturns `buffer.line_count`.\n@param buffer A buffer.\n@param display_line The display line number to use.\n@return number
document_end buffer.document_end(buffer)\nMoves the caret to the end of the buffer.\n@param buffer A buffer.
@@ -587,7 +587,7 @@ find string.find(s, pattern [, init [, plain]])\nLooks for the first match of `p
find ui.find (module)\nTextadept's Find & Replace pane.
find_column buffer.find_column(buffer, line, column)\nReturns the position of column number *column* on line number *line* (taking\ntab and multi-byte characters into account), or the position at the end of\nline *line*.\n@param buffer A buffer.\n@param line The line number in *buffer* to use.\n@param column The column number to use.
find_entry_text ui.find.find_entry_text (string)\nThe text in the "Find" entry.
-find_in_files ui.find.find_in_files(dir, filter)\nSearches directory *dir* or the user-specified directory for files that match\nsearch text and search options (subject to optional filter *filter*), and\nprints the results to a buffer titled "Files Found", highlighting found text.\nUse the `find_text`, `match_case`, `whole_word`, and `regex` fields to set\nthe search text and option flags, respectively.\nA filter is a table that contains:\n\n + Lua patterns that match filenames to exclude.\n + Optional `folders` sub-table that contains patterns matching directories\n to exclude.\n + Optional `extensions` sub-table that contains raw file extensions to\n exclude.\n + Optional `symlink` flag that when `true`, excludes symlinked files (but\n not symlinked directories).\n + Optional `folders.symlink` flag that when `true`, excludes symlinked\n directories.\n\nAny filter patterns starting with '!' exclude files and directories that do\nnot match the pattern that follows.\nIf *filter* is `nil`, the filter from the `ui.find.find_in_files_filters`\ntable is used. If that filter does not exist, `lfs.default_filter` is used.\n@param dir Optional directory path to search. If `nil`, the user is prompted\n for one.\n@param filter Optional filter for files and directories to exclude. The\n default value is `lfs.default_filter` unless a filter for *dir* is defined\n in `ui.find.find_in_files_filters`.\n@see find_in_files_filters
+find_in_files ui.find.find_in_files(dir, filter)\nSearches directory *dir* or the user-specified directory for files that match\nsearch text and search options (subject to optional filter *filter*), and\nprints the results to a buffer titled "Files Found", highlighting found text.\nUse the `find_text`, `match_case`, `whole_word`, and `regex` fields to set\nthe search text and option flags, respectively.\nA filter determines which files to search in, with the default filter being\n`lfs.default_filter`. A filter consists of Lua patterns that match filenames\nto include or exclude. Exclusive patterns begin with a '!'. If no inclusive\npatterns are given, any filename is initially considered. As a convenience,\nfile extensions can be specified literally instead of as a Lua pattern (e.g.\n'.lua' vs. '%.lua$'), and '/' also matches the Windows directory separator\n('[/\\]' is not needed).\nIf *filter* is `nil`, the filter from the `ui.find.find_in_files_filters`\ntable is used. If that filter does not exist, `lfs.default_filter` is used.\n@param dir Optional directory path to search. If `nil`, the user is prompted\n for one.\n@param filter Optional filter for files and directories to exclude. The\n default value is `lfs.default_filter` unless a filter for *dir* is defined\n in `ui.find.find_in_files_filters`.\n@see find_in_files_filters
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`.
@@ -911,7 +911,7 @@ punctuation_chars buffer.punctuation_chars (string)\nThe string set of character
python _G.keys.python (table)\nContainer for Python-specific key bindings.
python _G.snippets.python (table)\nContainer for Python-specific snippets.
python _M.python (module)\nThe python module.\nIt provides utilities for editing Python code.
-quick_open io.quick_open(paths, filter, opts)\nPrompts the user to select files to be opened from *paths*, a string\ndirectory path or list of directory paths, using a filtered list dialog.\nIf *paths* is `nil`, uses the current project's root directory, which is\nobtained from `io.get_project_root()`.\nFiles shown in the dialog do not match any pattern in either string or table\n*filter* (or `lfs.default_filter` if *filter* is `nil`). A filter table\ncontains:\n\n + Lua patterns that match filenames to exclude.\n + Optional `folders` sub-table that contains patterns matching directories\n to exclude.\n + Optional `extensions` sub-table that contains raw file extensions to\n exclude.\n + Optional `symlink` flag that when `true`, excludes symlinked files (but\n not symlinked directories).\n + Optional `folders.symlink` flag that when `true`, excludes symlinked\n directories.\n\nAny filter patterns starting with '!' exclude files and directories that do\nnot match the pattern that follows. The number of files in the list is capped\nat `quick_open_max`.\nIf *filter* is `nil` and *paths* is ultimately a string, the filter from the\n`io.quick_open_filters` table is used in place of `lfs.default_filter` if the\nformer exists.\n*opts* is an optional table of additional options for\n`ui.dialogs.filteredlist()`.\n@param paths Optional string directory path or table of directory paths to\n search. The default value is the current project's root directory, if\n available.\n@param filter Optional filter for files and directories to exclude. The\n default value is `lfs.default_filter` unless *paths* is a string and a\n filter for it is defined in `io.quick_open_filters`.\n@param opts Optional table of additional options for\n `ui.dialogs.filteredlist()`.\n@usage io.quick_open(buffer.filename:match('^.+/')) -- list all files in the\n current file's directory, subject to the default filter\n@usage io.quick_open(io.get_current_project(), '!%.lua$') -- list all Lua\n files in the current project\n@usage io.quick_open(io.get_current_project(), {folders = {'build'}}) -- list\n all non-built files in the current project\n@see io.quick_open_filters\n@see lfs.default_filter\n@see quick_open_max\n@see ui.dialogs.filteredlist
+quick_open io.quick_open(paths, filter, opts)\nPrompts the user to select files to be opened from *paths*, a string\ndirectory path or list of directory paths, using a filtered list dialog.\nIf *paths* is `nil`, uses the current project's root directory, which is\nobtained from `io.get_project_root()`.\nString or list *filter* determines which files to show in the dialog, with\nthe default filter being `lfs.default_filter`. A filter consists of Lua\npatterns that match file and directory paths to include or exclude. Exclusive\npatterns begin with a '!'. If no inclusive patterns are given, any path is\ninitially considered. As a convenience, file extensions can be specified\nliterally instead of as a Lua pattern (e.g. '.lua' vs. '%.lua$'), and '/'\nalso matches the Windows directory separator ('[/\\]' is not needed).\nThe number of files in the list is capped at `quick_open_max`.\nIf *filter* is `nil` and *paths* is ultimately a string, the filter from the\n`io.quick_open_filters` table is used in place of `lfs.default_filter` if the\nformer exists.\n*opts* is an optional table of additional options for\n`ui.dialogs.filteredlist()`.\n@param paths Optional string directory path or table of directory paths to\n search. The default value is the current project's root directory, if\n available.\n@param filter Optional filter for files and directories to exclude. The\n default value is `lfs.default_filter` unless *paths* is a string and a\n filter for it is defined in `io.quick_open_filters`.\n@param opts Optional table of additional options for\n `ui.dialogs.filteredlist()`.\n@usage io.quick_open(buffer.filename:match('^.+/')) -- list all files in the\n current file's directory, subject to the default filter\n@usage io.quick_open(io.get_current_project(), '%.lua$') -- list all Lua\n files in the current project\n@usage io.quick_open(io.get_current_project(), '![/\\]build') -- list all\n files in the current project except those in the build directory\n@see io.quick_open_filters\n@see lfs.default_filter\n@see quick_open_max\n@see ui.dialogs.filteredlist
quick_open_filters io.quick_open_filters (table)\nMap of file paths to filters used by `io.quick_open()`.\n@see quick_open
quick_open_max io.quick_open_max (number)\nThe maximum number of files listed in the quick open dialog.\nThe default value is `1000`.
quit _G.quit()\nEmits a `QUIT` event, and unless any handler returns `false`, quits\nTextadept.\n@see events.QUIT
@@ -1055,7 +1055,7 @@ setmode lfs.setmode(file, mode)\nSets the writing mode for a file. The mode stri
setupvalue debug.setupvalue(f, up, value)\nThis function assigns the value `value` to the upvalue with index `up`\nof the function `f`. The function returns nil if there is no upvalue with the\ngiven index. Otherwise, it returns the name of the upvalue.
setuservalue debug.setuservalue(udata, value)\nSets the given `value` as the Lua value associated to the given `udata`.\n`udata` must be a full userdata.\n\nReturns `udata`.\n\nNew in Lua 5.2.
setvbuf file:setvbuf(mode [, size])\nSets the buffering mode for an output file. There are three available\nmodes:\n "no": no buffering; the result of any output operation appears immediately.\n "full": full buffering; output operation is performed only when the\n buffer is full or when you explicitly `flush` the file (see\n `io.flush`).\n "line": line buffering; output is buffered until a newline is output or\n there is any input from some special files (such as a terminal\n device).\n\nFor the last two cases, `size` specifies the size of the buffer, in\nbytes. The default is an appropriate size.
-show_documentation textadept.editing.show_documentation()\nDisplays a call tip with documentation for the symbol under or directly\nbehind the caret.\nDocumentation is read from API files in the `api_files` table.\nIf a call tip is already shown, cycles to the next one if it exists.\nSymbols are determined by using `buffer.word_chars`.\n@see api_files\n@see buffer.word_chars
+show_documentation textadept.editing.show_documentation(pos)\nDisplays a call tip with documentation for the symbol under or directly\nbehind position *pos* or the caret position.\nDocumentation is read from API files in the `api_files` table.\nIf a call tip is already shown, cycles to the next one if it exists.\nSymbols are determined by using `buffer.word_chars`.\n@param pos Optional position of the symbol to show documentation for. If\n omitted, the caret position is used.\n@see api_files\n@see buffer.word_chars
show_lines buffer.show_lines(buffer, start_line, end_line)\nShows the range of lines between line numbers *start_line* to *end_line*.\nThis has no effect on fold levels or fold flags and the first line cannot be\nhidden.\n@param buffer A buffer.\n@param start_line The start line of the range of lines in *buffer* to show.\n@param end_line The end line of the range of lines in *buffer* to show.
silent_print ui.silent_print (bool)\nWhether or not to print messages to buffers silently.\nThis is not guaranteed to be a constant value, as Textadept may change it\nfor the editor's own purposes. This flag should be used only in conjunction\nwith a group of `ui.print()` and `ui._print()` function calls.\nThe default value is `false`, and focuses buffers when messages are printed\nto them.
sin math.sin(x)\nReturns the sine of `x` (assumed to be in radians).