diff options
-rw-r--r-- | modules/lua/api | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/lua/api b/modules/lua/api index 0c90d3e8..c55fe510 100644 --- a/modules/lua/api +++ b/modules/lua/api @@ -82,7 +82,7 @@ FILE_BEFORE_SAVE events.FILE_BEFORE_SAVE (string)\nEmitted right before saving a FILE_CHANGED events.FILE_CHANGED (string)\nEmitted when Textadept detects that an open file was modified externally.\nWhen connecting to this event, connect with an index of 1 to override the\ndefault prompt to reload the file.\nArguments:\n\n* _`filename`_: The filename externally modified. FILE_OPENED events.FILE_OPENED (string)\nEmitted after opening a file in a new buffer.\nEmitted by `io.open_file()`.\nArguments:\n\n* _`filename`_: The opened file's filename. FILTER lfs.FILTER (table)\nThe filter table containing common binary file extensions and version control\ndirectories to exclude when iterating over files and directories using\n`dir_foreach` when its `exclude_FILTER` argument is `false`.\n@see dir_foreach -FILTER ui.find.FILTER (table)\nThe table of Lua patterns matching files and directories to exclude when\nfinding in files.\nThe filter contains Lua patterns that match filenames to exclude, an optional\n`folders` sub-table that contains patterns matching directories to exclude,\nand an optional `extensions` sub-table that contains raw file extensions to\nexclude. Any patterns starting with '!' exclude files and directories that do\nnot match the pattern that follows.\nThe default value is `lfs.FILTER`, a filter for common binary file extensions\nand version control directories.\n@see find_in_files\n@see lfs.FILTER +FILTER ui.find.FILTER (table)\nThe table of Lua patterns matching files and directories to exclude when\nfinding in files.\nThe 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 patterns starting with '!' exclude files and directories that do not\nmatch the pattern that follows.\nThe default value is `lfs.FILTER`, a filter for common binary file extensions\nand version control directories.\n@see find_in_files\n@see lfs.FILTER FIND events.FIND (string)\nEmitted to find text via the Find & Replace Pane.\nArguments:\n\n* _`text`_: The text to search for.\n* _`next`_: Whether or not to search forward. FIND_MATCHCASE buffer.FIND_MATCHCASE (number, Read-only)\n FIND_REGEXP buffer.FIND_REGEXP (number, Read-only)\n @@ -540,7 +540,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, exclude_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*,\nand, unless *exclude_FILTER* is `true`, `lfs.FILTER` as well. A filter table\ncontains Lua patterns that match filenames to exclude, an optional `folders`\nsub-table that contains patterns matching directories to exclude, and an\noptional `extensions` sub-table that contains raw file extensions to exclude.\nAny patterns starting with '!' exclude files and directories that do not\nmatch the pattern that follows.\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.\n@param exclude_FILTER Optional flag indicating whether or not to exclude the\n default filter `lfs.FILTER` in the search. If `false`, adds `lfs.FILTER` to\n *filter*.\n The default value is `false` to include the 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, exclude_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*,\nand, unless *exclude_FILTER* is `true`, `lfs.FILTER` as well. 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.\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.\n@param exclude_FILTER Optional flag indicating whether or not to exclude the\n default filter `lfs.FILTER` in the search. If `false`, adds `lfs.FILTER` to\n *filter*.\n The default value is `false` to include the 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. @@ -1042,7 +1042,7 @@ sin math.sin(x)\nReturns the sine of `x` (assumed to be in radians). sinh math.sinh(x)\nReturns the hyperbolic sine of `x`.\n\nDeprecated in Lua 5.3. size ui.size (table)\nA table containing the width and height pixel values of Textadept's window. size view.size (number)\nThe split resizer's pixel position if the view is a split one. -snapopen io.snapopen(paths, filter, exclude_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, unless *exclude_FILTER* is `true`, in `lfs.FILTER`. A filter\ntable contains Lua patterns that match filenames to exclude, an optional\n`folders` sub-table that contains patterns matching directories to exclude,\nand an optional `extensions` sub-table that contains raw file extensions to\nexclude. Any 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 `SNAPOPEN_MAX`. If *filter* is `nil` and *paths* is ultimately a string,\nthe filter from the `io.snapopen_filters` table is used. In that case, unless\nexplicitly specified, *exclude_FILTER* becomes `true`.\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 comes from `io.snapopen_filters` if *paths* is a string.\n@param exclude_FILTER Optional flag indicating whether or not to exclude the\n default filter `lfs.FILTER` in the search. If `false`, adds `lfs.FILTER` to\n *filter*.\n Normally, the default value is `false` to include the default filter.\n However, in the instances where *filter* comes from `io.snapopen_filters`,\n the default value is `true`.\n@param opts Optional table of additional options for\n `ui.dialogs.filteredlist()`.\n@usage io.snapopen(buffer.filename:match('^.+/')) -- list all files in the\n current file's directory, subject to the default filter\n@usage io.snapopen('/project', '!%.lua$') -- list all Lua files in a project\n directory\n@usage io.snapopen('/project', {folders = {'build'}}) -- list all source\n files in a project directory\n@see io.snapopen_filters\n@see lfs.FILTER\n@see SNAPOPEN_MAX\n@see ui.dialogs.filteredlist +snapopen io.snapopen(paths, filter, exclude_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, unless *exclude_FILTER* is `true`, in `lfs.FILTER`. A filter\ntable 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. The number of files in the list is capped\nat `SNAPOPEN_MAX`. If *filter* is `nil` and *paths* is ultimately a string,\nthe filter from the `io.snapopen_filters` table is used. In that case, unless\nexplicitly specified, *exclude_FILTER* becomes `true`.\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 comes from `io.snapopen_filters` if *paths* is a string.\n@param exclude_FILTER Optional flag indicating whether or not to exclude the\n default filter `lfs.FILTER` in the search. If `false`, adds `lfs.FILTER` to\n *filter*.\n Normally, the default value is `false` to include the default filter.\n However, in the instances where *filter* comes from `io.snapopen_filters`,\n the default value is `true`.\n@param opts Optional table of additional options for\n `ui.dialogs.filteredlist()`.\n@usage io.snapopen(buffer.filename:match('^.+/')) -- list all files in the\n current file's directory, subject to the default filter\n@usage io.snapopen('/project', '!%.lua$') -- list all Lua files in a project\n directory\n@usage io.snapopen('/project', {folders = {'build'}}) -- list all source\n files in a project directory\n@see io.snapopen_filters\n@see lfs.FILTER\n@see SNAPOPEN_MAX\n@see ui.dialogs.filteredlist snapopen_filters io.snapopen_filters (table)\nMap of file paths to filters used by `io.snapopen()`.\n@see snapopen snippets _G.snippets (table)\nMap of snippet triggers with their snippet text, with language-specific\nsnippets tables assigned to a lexer name key.\nThis table also contains the `textadept.snippets` module. snippets textadept.snippets (module)\nSnippets for Textadept. |