diff options
author | 2013-03-29 23:42:25 -0400 | |
---|---|---|
committer | 2013-03-29 23:42:25 -0400 | |
commit | 02dd2c0bd0cad34182f4b55de54a9ea38e9ada50 (patch) | |
tree | 684516f84013de32ff2b792797af3341d60603b0 /modules/lua/api | |
parent | d64a4113ea658d2ed6818d94b4f0ee5b18ddbe19 (diff) | |
download | textadept-02dd2c0bd0cad34182f4b55de54a9ea38e9ada50.tar.gz textadept-02dd2c0bd0cad34182f4b55de54a9ea38e9ada50.zip |
Updated Lua Adeptsense.
Diffstat (limited to 'modules/lua/api')
-rw-r--r-- | modules/lua/api | 76 |
1 files changed, 39 insertions, 37 deletions
diff --git a/modules/lua/api b/modules/lua/api index bade89d4..0ee2e74e 100644 --- a/modules/lua/api +++ b/modules/lua/api @@ -7,11 +7,12 @@ AUTOPAIR _M.textadept.editing.AUTOPAIR (bool)\nAutomatically close opening '(', AUTO_C_CHAR_DELETED events.AUTO_C_CHAR_DELETED (string)\nCalled when deleting a character while the autocompletion list is active. AUTO_C_RELEASE events.AUTO_C_RELEASE (string)\nCalled when canceling the autocompletion list. AUTO_C_SELECTION events.AUTO_C_SELECTION (string)\nCalled when selecting an item in the autocompletion list and before\ninserting the selection.\nAutomatic insertion can be cancelled by calling\n`buffer:auto_c_cancel()` before returning from the event handler.\nArguments:\n\n* _`text`_: The text of the selection.\n* _`position`_: The position in the buffer of the beginning of the\n autocompleted word. +B lpeg.B(patt)\nReturns a pattern that matches only if the input string at the current\nposition is preceded by `patt`. Pattern `patt` must match only strings with\nsome fixed length, and it cannot contain captures.\n\nLike the and predicate, this pattern never consumes any input, independently\nof success or failure. BUFFER_AFTER_SWITCH events.BUFFER_AFTER_SWITCH (string)\nCalled right after switching to another buffer.\nEmitted by `view:goto_buffer()`. BUFFER_BEFORE_SWITCH events.BUFFER_BEFORE_SWITCH (string)\nCalled right before switching to another buffer.\nEmitted by `view:goto_buffer()`. BUFFER_DELETED events.BUFFER_DELETED (string)\nCalled after deleting a buffer.\nEmitted by `buffer:delete()`. BUFFER_NEW events.BUFFER_NEW (string)\nCalled after creating a new buffer.\nEmitted on startup and by `new_buffer()`. -C lpeg.C(patt)\nCreates a simple capture, which captures the substring of the subject that\nmatches patt. The captured value is a string. If patt has other captures,\ntheir values are returned after this one. +C lpeg.C(patt)\nCreates a simple capture, which captures the substring of the subject that\nmatches `patt`. The captured value is a string. If `patt` has other captures,\ntheir values are returned after this one. CALL_TIP_CLICK events.CALL_TIP_CLICK (string)\nCalled when clicking on a calltip.\nArguments:\n\n* _`position`_: `1` if the up arrow was clicked, 2 if the down arrow was\n clicked, and 0 otherwise. CARETSTYLE_BLOCK _SCINTILLA.constants.CARETSTYLE_BLOCK\n2 CARETSTYLE_INVISIBLE _SCINTILLA.constants.CARETSTYLE_INVISIBLE\n0 @@ -29,17 +30,16 @@ COMMAND_ENTRY_KEYPRESS events.COMMAND_ENTRY_KEYPRESS (string)\nCalled when press COMMENT lexer.COMMENT (string)\nThe token name for comment tokens. COMPILE_OUTPUT _M.textadept.run._G.events.COMPILE_OUTPUT (string)\nCalled after executing a language's compile command.\nBy default, compiler output is printed to the message buffer. To override\nthis behavior, connect to the event with an index of `1` and return `true`.\nArguments:\n\n* `lexer`: The lexer language name.\n* `output`: The string output from the command. CONSTANT lexer.CONSTANT (string)\nThe token name for constant tokens. -Carg lpeg.Carg(n)\nCreates an argument capture. This pattern matches the empty string and\nproduces the value given as the nth extra argument given in the call to\nlpeg.match. -Cb lpeg.Cb(name)\nCreates a back capture. This pattern matches the empty string and produces\nthe values produced by the most recent group capture named name.\n\nMost recent means the last complete outermost group capture with the given\nname. A Complete capture means that the entire pattern corresponding to the\ncapture has matched. An Outermost capture means that the capture is not\ninside another complete capture. +Carg lpeg.Carg(n)\nCreates an argument capture. This pattern matches the empty string and\nproduces the value given as the nth extra argument given in the call to\n`lpeg.match`. +Cb lpeg.Cb(name)\nCreates a back capture. This pattern matches the empty string and produces\nthe values produced by the most recent group capture named `name`.\n\nMost recent means the last complete outermost group capture with the given\nname. A Complete capture means that the entire pattern corresponding to the\ncapture has matched. An Outermost capture means that the capture is not\ninside another complete capture. Cc lpeg.Cc([value, ...])\nCreates a constant capture. This pattern matches the empty string and\nproduces all given values as its captured values. -Cf lpeg.Cf(patt, func)\nCreates a fold capture. If patt produces a list of captures C1 C2 ... Cn,\nthis capture will produce the value func(...func(func(C1, C2), C3)..., Cn),\nthat is, it will fold (or accumulate, or reduce) the captures from patt using\nfunction func.\n\nThis capture assumes that patt should produce at least one capture with at\nleast one value (of any type), which becomes the initial value of an\naccumulator. (If you need a specific initial value, you may prefix a constant\ncapture to patt.) For each subsequent capture LPeg calls func with this\naccumulator as the first argument and all values produced by the capture as\nextra arguments; the value returned by this call becomes the new value for\nthe accumulator. The final value of the accumulator becomes the captured\nvalue.\n\nAs an example, the following pattern matches a list of numbers separated by\ncommas and returns their addition:\n\n -- matches a numeral and captures its value\n number = lpeg.R"09"^1 / tonumber\n -- matches a list of numbers, captures their values\n list = number * ("," * number)^0\n -- auxiliary function to add two numbers\n function add (acc, newvalue) return acc + newvalue end\n -- folds the list of numbers adding them\n sum = lpeg.Cf(list, add)\n -- example of use\n print(sum:match("10,30,43")) --> 83 -Cg lpeg.Cg(patt [, name])\nCreates a group capture. It groups all values returned by patt into a single\ncapture. The group may be anonymous (if no name is given) or named with the\ngiven name.\n\nAn anonymous group serves to join values from several captures into a single\ncapture. A named group has a different behavior. In most situations, a named\ngroup returns no values at all. Its values are only relevant for a following\nback capture or when used inside a table capture. -Cmt lpeg.Cmt(patt, function)\nCreates a match-time capture. Unlike all other captures, this one is\nevaluated immediately when a match occurs. It forces the immediate evaluation\nof all its nested captures and then calls function.\n\nThe given function gets as arguments the entire subject, the current position\n(after the match of patt), plus any capture values produced by patt.\n\nThe first value returned by function defines how the match happens. If the\ncall returns a number, the match succeeds and the returned number becomes the\nnew current position. (Assuming a subject s and current position i, the\nreturned number must be in the range [i, len(s) + 1].) If the call returns\ntrue, the match succeeds without consuming any input. (So, to return true is\nequivalent to return i.) If the call returns false, nil, or no value, the\nmatch fails.\n\nAny extra values returned by the function become the values produced by the\ncapture. +Cf lpeg.Cf(patt, func)\nCreates a fold capture. If patt produces a list of captures C1 C2 ... Cn,\nthis capture will produce the value func(...func(func(C1, C2), C3)..., Cn),\nthat is, it will fold (or accumulate, or reduce) the captures from `patt`\nusing function `func`.\n\nThis capture assumes that `patt` should produce at least one capture with at\nleast one value (of any type), which becomes the initial value of an\naccumulator. (If you need a specific initial value, you may prefix a constant\ncapture to `patt`.) For each subsequent capture, LPeg calls `func` with this\naccumulator as the first argument and all values produced by the capture as\nextra arguments; the first result from this call becomes the new value for\nthe accumulator. The final value of the accumulator becomes the captured\nvalue.\n\nAs an example, the following pattern matches a list of numbers separated by\ncommas and returns their addition:\n\n -- matches a numeral and captures its numerical value\n number = lpeg.R"09"^1 / tonumber\n -- matches a list of numbers, capturing their values\n list = number * ("," * number)^0\n -- auxiliary function to add two numbers\n function add (acc, newvalue) return acc + newvalue end\n -- folds the list of numbers adding them\n sum = lpeg.Cf(list, add)\n -- example of use\n print(sum:match("10,30,43")) --> 83 +Cg lpeg.Cg(patt [, name])\nCreates a group capture. It groups all values returned by `patt` into a\nsingle capture. The group may be anonymous (if no name is given) or named\nwith the given name.\n\nAn anonymous group serves to join values from several captures into a single\ncapture. A named group has a different behavior. In most situations, a named\ngroup returns no values at all. Its values are only relevant for a following\nback capture or when used inside a table capture. +Cmt lpeg.Cmt(patt, function)\nCreates a match-time capture. Unlike all other captures, this one is\nevaluated immediately when a match occurs. It forces the immediate evaluation\nof all its nested captures and then calls `function`.\n\nThe given function gets as arguments the entire subject, the current position\n(after the match of `patt`), plus any capture values produced by `patt`.\n\nThe first value returned by `function` defines how the match happens. If the\ncall returns a number, the match succeeds and the returned number becomes the\nnew current position. (Assuming a subject s and current position i, the\nreturned number must be in the range [i, len(s) + 1].) If the call returns\ntrue, the match succeeds without consuming any input. (So, to return true is\nequivalent to return i.) If the call returns false, nil, or no value, the\nmatch fails.\n\nAny extra values returned by the function become the values produced by the\ncapture. Cp lpeg.Cp()\nCreates a position capture. It matches the empty string and captures the\nposition in the subject where the match occurs. The captured value is a\nnumber. -Cs lpeg.Cs(patt)\nCreates a substitution capture, which captures the substring of the subject\nthat matches patt, with substitutions. For any capture inside patt with a\nvalue, the substring that matched the capture is replaced by the capture\nvalue (which should be a string). The final captured value is the string\nresulting from all replacements. -Ct lpeg.Ct(patt)\nCreates a table capture. This capture creates a table and puts all values\nfrom all anonymous captures made by patt inside this table in successive\ninteger keys, starting at 1. Moreover, for each named capture group created\nby patt, the first value of the group is put into the table with the group\nname as its key. The captured value is only the table. +Cs lpeg.Cs(patt)\nCreates a substitution capture, which captures the substring of the subject\nthat matches `patt`, with substitutions. For any capture inside `patt` with a\nvalue, the substring that matched the capture is replaced by the capture\nvalue (which should be a string). The final captured value is the string\nresulting from all replacements. +Ct lpeg.Ct(patt)\nCreates a table capture. This capture creates a table and puts all values\nfrom all anonymous captures made by `patt` inside this table in successive\ninteger keys, starting at 1. Moreover, for each named capture group created\nby `patt`, the first value of the group is put into the table with the group\nname as its key. The captured value is only the table. DEFAULT lexer.DEFAULT (string)\nThe token name for default tokens. -DEFAULT_DEPTH _M.textadept.snapopen.DEFAULT_DEPTH (number)\nThe maximum directory depth to search.\nThe default value is `99`. DEFAULT_SESSION _M.textadept.session.DEFAULT_SESSION (string)\nThe path to the default session file, *`_USERHOME`/session*, or\n*`_USERHOME`/session_term* if `_G.NCURSES` is `true`. DOUBLE_CLICK events.DOUBLE_CLICK (string)\nCalled after double-clicking the mouse button.\nArguments:\n\n* _`position`_: The position in the buffer double-clicked.\n* _`line`_: The line number double-clicked.\n* _`modifiers`_: A bit-mask of modifier keys held down. Modifiers are\n `_SCINTILLA.constants.SCMOD_ALT`, `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the "Control" modifier is reported as\n *both* "Control" and "Alt" due to a Scintilla limitation with GTK+. DWELL_END events.DWELL_END (string)\nCalled after a `DWELL_START` when the mouse moves, a key is pressed, etc.\nArguments:\n\n* _`position`_: The position in the buffer closest to *x* and *y*.\n* _`x`_: The x-coordinate of the mouse in the view.\n* _`y`_: The y-coordinate of the mouse in the view. @@ -55,9 +55,13 @@ FILE_AFTER_SAVE io._G.events.FILE_AFTER_SAVE (string)\nCalled right after saving FILE_BEFORE_SAVE io._G.events.FILE_BEFORE_SAVE (string)\nCalled right before saving a file to disk.\nEmitted by `buffer:save()`.\nArguments:\n\n* _`filename`_: The UTF-8-encoded filename. FILE_OPENED io._G.events.FILE_OPENED (string)\nCalled when opening a file in a new buffer.\nEmitted by `open_file()`.\nArguments:\n\n* _`filename`_: The UTF-8-encoded filename. FILE_SAVED_AS io._G.events.FILE_SAVED_AS (string)\nCalled after saving a file under a different filename.\nEmitted by `buffer:save_as()`.\nArguments:\n\n* _`filename`_: The UTF-8-encoded filename. -FILTER _M.textadept.snapopen.FILTER (table)\nThe default filter table containing common binary file extensions and version\ncontrol folders to exclude from snapopen file lists. +FILTER gui.find.FILTER (table)\nTable of Lua patterns matching files and folders to exclude when finding in\nfiles.\nEach filter string is a pattern that matches filenames to exclude, with\npatterns matching folders to exclude listed in a `folders` sub-table.\nPatterns starting with '!' exclude files and folders that do not match the\npattern that follows. Use a table of raw file extensions assigned to an\n`extensions` key for fast filtering by extension. All strings must be encoded\nin `_G._CHARSET`, not UTF-8.\nThe default value is `lfs.FILTER`, a filter for common binary file extensions\nand version control folders.\n@see find_in_files +FILTER lfs.FILTER (table)\nFilter table containing common binary file extensions and version control\nfolders to exclude when iterating over files and directories using\n`dir_foreach` when its `exclude_FILTER` argument is `false`.\n@see dir_foreach FIND events.FIND (string)\nCalled to find text via the Find dialog box.\nArguments:\n\n* _`text`_: The text to search for.\n* _`next`_: Whether or not to search forward. FIND_WRAPPED gui.find._G.events.FIND_WRAPPED (string)\nCalled when a search for text wraps, either from bottom to top when\nsearching for a next occurrence, or from top to bottom when searching for a\nprevious occurrence.\nThis is useful for implementing a more visual or audible notice when a\nsearch wraps in addition to the statusbar message. +FOLD_BASE lexer.FOLD_BASE (number)\nThe initial (root) fold level. +FOLD_BLANK lexer.FOLD_BLANK (number)\nFlag indicating that the line is blank. +FOLD_HEADER lexer.FOLD_HEADER (number)\nFlag indicating the line is fold point. FUNCTION _M.textadept.adeptsense.FUNCTION (string)\nCtags kind for Adeptsense functions. FUNCTION lexer.FUNCTION (string)\nThe token name for function tokens. FUNCTIONS _M.textadept.adeptsense.FUNCTIONS (string)\nXPM image for Adeptsense functions. @@ -102,17 +106,16 @@ MARGIN_CLICK events.MARGIN_CLICK (string)\nCalled when clicking the mouse inside MARKER_MAX _SCINTILLA.constants.MARKER_MAX\n31 MARK_BOOKMARK_COLOR _M.textadept.bookmarks.MARK_BOOKMARK_COLOR (number)\nThe color, in "0xBBGGRR" format, used for a bookmarked line. MARK_HIGHLIGHT_BACK _M.textadept.editing.MARK_HIGHLIGHT_BACK (number)\nThe background color, in "0xBBGGRR" format, used for a line containing the\nhighlighted word. -MAX _M.textadept.snapopen.MAX (number)\nThe maximum number of files to list.\nThe default value is `1000`. MAX_RECENT_FILES _M.textadept.session.MAX_RECENT_FILES (number)\nThe maximum number of recent files to save to the session.\nRecent files are stored in `io.recent_files`.\nThe default value is `10`. MENU_CLICKED events.MENU_CLICKED (string)\nCalled after selecting a menu item.\nArguments:\n\n* _`menu_id`_: The numeric ID of the menu item set in `gui.menu()`. NCURSES _G.NCURSES (bool)\nIf Textadept is running in the terminal, this flag is `true`.\nncurses feature incompatibilities are listed in the Appendix. NUMBER lexer.NUMBER (string)\nThe token name for number tokens. OPERATOR lexer.OPERATOR (string)\nThe token name for operator tokens. OSX _G.OSX (bool)\nIf Textadept is running on Mac OSX, this flag is `true`. -P lpeg.P(value)\nConverts the given value into a proper pattern, according to the following\nrules:\n * If the argument is a pattern, it is returned unmodified.\n * If the argument is a string, it is translated to a pattern that matches\n literally the string.\n * If the argument is a non-negative number n, the result is a pattern that\n matches exactly n characters.\n * If the argument is a negative number -n, the result is a pattern that\n succeeds only if the input string does not have n characters: lpeg.P(-n)\n is equivalent to -lpeg.P(n) (see the unary minus operation).\n * If the argument is a boolean, the result is a pattern that always\n succeeds or always fails (according to the boolean value), without\n consuming any input.\n * If the argument is a table, it is interpreted as a grammar (see\n Grammars).\n * If the argument is a function, returns a pattern equivalent to a\n match-time capture over the empty string. +P lpeg.P(value)\nConverts the given value into a proper pattern, according to the following\nrules:\n * If the argument is a pattern, it is returned unmodified.\n * If the argument is a string, it is translated to a pattern that matches\n the string literally.\n * If the argument is a non-negative number n, the result is a pattern that\n matches exactly n characters.\n * If the argument is a negative number -n, the result is a pattern that\n succeeds only if the input string has less than n characters left:\n `lpeg.P(-n)` is equivalent to `-lpeg.P(n)` (see the unary minus\n operation).\n * If the argument is a boolean, the result is a pattern that always\n succeeds or always fails (according to the boolean value), without\n consuming any input.\n * If the argument is a table, it is interpreted as a grammar (see\n Grammars).\n * If the argument is a function, returns a pattern equivalent to a\n match-time capture over the empty string. PREPROCESSOR lexer.PREPROCESSOR (string)\nThe token name for preprocessor tokens. QUIT events.QUIT (string)\nCalled when quitting Textadept.\nWhen connecting to this event, connect with an index of 1 or the handler\nwill be ignored.\nEmitted by `quit()`. -R lpeg.R({range})\nReturns a pattern that matches any single character belonging to one of the\ngiven ranges. Each range is a string xy of length 2, representing all\ncharacters with code between the codes of x and y (both inclusive).\n\nAs an example, the pattern lpeg.R("09") matches any digit, and lpeg.R("az",\n"AZ") matches any ASCII letter. +R lpeg.R({range})\nReturns a pattern that matches any single character belonging to one of the\ngiven ranges. Each `range` is a string xy of length 2, representing all\ncharacters with code between the codes of x and y (both inclusive).\n\nAs an example, the pattern `lpeg.R("09")` matches any digit, and\n`lpeg.R("az", "AZ")` matches any ASCII letter. REGEX lexer.REGEX (string)\nThe token name for regex tokens. REPLACE events.REPLACE (string)\nCalled to replace selected (found) text.\nArguments:\n\n* _`text`_: The text to replace the selected text with. REPLACE_ALL events.REPLACE_ALL (string)\nCalled to replace all occurrences of found text.\nArguments:\n\n* _`find_text`_: The text to search for.\n* _`repl_text`_: The text to replace found text with. @@ -120,7 +123,7 @@ RESETTING _G.RESETTING (bool)\nIf `reset()` has been called, this flag is `true` RESET_AFTER events.RESET_AFTER (string)\nCalled after resetting the Lua state.\nEmitted by `reset()`. RESET_BEFORE events.RESET_BEFORE (string)\nCalled before resetting the Lua state.\nEmitted by `reset()`. RUN_OUTPUT _M.textadept.run._G.events.RUN_OUTPUT (string)\nCalled after executing a language's run command.\nBy default, output is printed to the message buffer. To override this\nbehavior, connect to the event with an index of `1` and return `true`.\nArguments:\n\n* `lexer`: The lexer language name.\n* `output`: The string output from the command. -S lpeg.S(string)\nReturns a pattern that matches any single character that appears in the given\nstring. (The S stands for Set.)\n\nAs an example, the pattern lpeg.S("+-*/") matches any arithmetic operator.\n\nNote that, if s is a character (that is, a string of length 1), then\nlpeg.P(s) is equivalent to lpeg.S(s) which is equivalent to lpeg.R(s..s).\nNote also that both lpeg.S("") and lpeg.R() are patterns that always fail. +S lpeg.S(string)\nReturns a pattern that matches any single character that appears in the given\nstring. (The S stands for Set.)\n\nAs an example, the pattern `lpeg.S("+-*/")` matches any arithmetic operator.\n\nNote that, if `s` is a character (that is, a string of length 1), then\n`lpeg.P(s)` is equivalent to `lpeg.S(s)` which is equivalent to\n`lpeg.R(s..s)`. Note also that both `lpeg.S("")` and `lpeg.R()` are patterns\nthat always fail. SAVE_ON_QUIT _M.textadept.session.SAVE_ON_QUIT (bool)\nSave the session when quitting.\nThe default value is `true`, but is disabled when passing the command line\nswitch `-n` or `--nosession` to Textadept. SAVE_POINT_LEFT events.SAVE_POINT_LEFT (string)\nCalled after leaving a save point. SAVE_POINT_REACHED events.SAVE_POINT_REACHED (string)\nCalled after reaching a save point. @@ -615,13 +618,9 @@ SC_FOLDFLAG_LINEAFTER_EXPANDED _SCINTILLA.constants.SC_FOLDFLAG_LINEAFTER_EXPAND SC_FOLDFLAG_LINEBEFORE_CONTRACTED _SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_CONTRACTED\n4 SC_FOLDFLAG_LINEBEFORE_EXPANDED _SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_EXPANDED\n2 SC_FOLDLEVELBASE _SCINTILLA.constants.SC_FOLDLEVELBASE\n1024 -SC_FOLDLEVELBASE lexer.SC_FOLDLEVELBASE (number)\nThe initial (root) fold level. SC_FOLDLEVELHEADERFLAG _SCINTILLA.constants.SC_FOLDLEVELHEADERFLAG\n8192 -SC_FOLDLEVELHEADERFLAG lexer.SC_FOLDLEVELHEADERFLAG (number)\nFlag indicating the line is fold point. SC_FOLDLEVELNUMBERMASK _SCINTILLA.constants.SC_FOLDLEVELNUMBERMASK\n4095 -SC_FOLDLEVELNUMBERMASK lexer.SC_FOLDLEVELNUMBERMASK (number)\nFlag used with `SCI_GETFOLDLEVEL(line)` to get the fold level of a line. SC_FOLDLEVELWHITEFLAG _SCINTILLA.constants.SC_FOLDLEVELWHITEFLAG\n4096 -SC_FOLDLEVELWHITEFLAG lexer.SC_FOLDLEVELWHITEFLAG (number)\nFlag indicating that the line is blank. SC_FONT_SIZE_MULTIPLIER _SCINTILLA.constants.SC_FONT_SIZE_MULTIPLIER\n100 SC_IV_LOOKBOTH _SCINTILLA.constants.SC_IV_LOOKBOTH\n3 SC_IV_LOOKFORWARD _SCINTILLA.constants.SC_IV_LOOKFORWARD\n2 @@ -739,6 +738,7 @@ SC_WRAPVISUALFLAG_START _SCINTILLA.constants.SC_WRAPVISUALFLAG_START\n2 SC_WRAP_CHAR _SCINTILLA.constants.SC_WRAP_CHAR\n2 SC_WRAP_NONE _SCINTILLA.constants.SC_WRAP_NONE\n0 SC_WRAP_WORD _SCINTILLA.constants.SC_WRAP_WORD\n1 +SNAPOPEN_MAX io.SNAPOPEN_MAX (number)\nThe maximum number of files to list in the snapopen dialog.\nThe default value is `1000`. STRING lexer.STRING (string)\nThe token name for string tokens. STRIP_WHITESPACE_ON_SAVE _M.textadept.editing.STRIP_WHITESPACE_ON_SAVE (bool)\nStrip trailing whitespace on file save.\nThe default value is `true`. STYLE_BRACEBAD _SCINTILLA.constants.STYLE_BRACEBAD\n35 @@ -756,7 +756,7 @@ UNDO_MAY_COALESCE _SCINTILLA.constants.UNDO_MAY_COALESCE\n1 UPDATE_UI events.UPDATE_UI (string)\nCalled when the text, styling, or selection range in the buffer changes. URI_DROPPED events.URI_DROPPED (string)\nCalled after dragging and dropping a URI such as a file name onto the view.\nArguments:\n\n* _`text`_: The UTF-8-encoded URI text. USER_LIST_SELECTION events.USER_LIST_SELECTION (string)\nCalled after selecting an item in a user list.\nArguments:\n\n* _`list_type`_: The *list_type* from `buffer:user_list_show()`.\n* _`text`_: The text of the selection.\n* _`position`_: The position in the buffer the list was displayed at. -V lpeg.V(v)\nThis operation creates a non-terminal (a variable) for a grammar. The created\nnon-terminal refers to the rule indexed by v in the enclosing grammar. (See\nGrammars for details.) +V lpeg.V(v)\nThis operation creates a non-terminal (a variable) for a grammar. The created\nnon-terminal refers to the rule indexed by `v` in the enclosing grammar. (See\nGrammars for details.) VARIABLE lexer.VARIABLE (string)\nThe token name for variable tokens. VIEW_AFTER_SWITCH events.VIEW_AFTER_SWITCH (string)\nCalled right after switching to another view.\nEmitted by `gui.goto_view()`. VIEW_BEFORE_SWITCH events.VIEW_BEFORE_SWITCH (string)\nCalled right before switching to another view.\nEmitted by `gui.goto_view()`. @@ -940,7 +940,7 @@ compile _M.textadept.run.compile()\nCompiles the file based on its extension usi compile_command _M.textadept.run.compile_command (table)\nMap of file extensions (excluding the leading '.') to their associated\n"compile" shell command line strings or functions returning such strings.\nCommand line strings may have the following macros:\n\n + `%(filepath)`: The full path of the current file.\n + `%(filedir)`: The current file's directory path.\n + `%(filename)`: The name of the file, including its extension.\n + `%(filename_noext)`: The name of the file, excluding its extension.\n\nThis table is typically populated by language-specific modules. complete _M.textadept.adeptsense.complete(sense, only_fields, only_functions)\nShows an autocompletion list of functions (unless *only_fields* is `true`)\nand fields (unless *only_funcs* is `true`) for the symbol behind the caret,\nreturning `true` on success.\n@param sense The Adeptsense returned by `adeptsense.new()`. If `nil`, uses\n the current language's Adeptsense (if it exists).\n@param only_fields Optional flag indicating whether or not to return a list\n of only fields. The default value is `false`.\n@param only_functions Optional flag indicating whether or not to return a\n list of only functions. The default value is `false`.\n@return `true` on success or `false`.\n@see get_symbol\n@see get_completions completions _M.textadept.adeptsense.completions (table)\nA list containing lists of possible completions for known symbols.\nEach symbol key has a table value that contains a list of field completions\nwith a `fields` key and a list of functions completions with a `functions`\nkey. This table is normally populated by `load_ctags()`, but can also be set\nby the user. -concat table.concat(list [, sep [, i [, j]]])\nGiven a list where all elements are strings or numbers, returns\n`list[i]..sep..list[i+1] ··· sep..list[j]`. The default value for `sep` is\nthe empty string, the default for `i` is 1, and the default for `j` is\n`#list`. If `i` is greater than `j`, returns the empty string. +concat table.concat(list [, sep [, i [, j]]])\nGiven a list where all elements are strings or numbers, returns the string\n`list[i]..sep..list[i+1] ··· sep..list[j]`. The default value for `sep` is\nthe empty string, the default for `i` is 1, and the default for `j` is\n`#list`. If `i` is greater than `j`, returns the empty string. config package.config (string)\nA string describing some compile-time configurations for packages. This\nstring is a sequence of lines:\n The first line is the directory separator string. Default is '`\`' for\n Windows and '`/`' for all other systems.\n The second line is the character that separates templates in a path.\n Default is '`;`'.\n The third line is the string that marks the substitution points in a\n template. Default is '`?`'.\n The fourth line is a string that, in a path in Windows, is replaced by\n the executable's directory. Default is '`!`'.\n The fifth line is a mark to ignore all text before it when building the\n `luaopen_` function name. Default is '`-`'. connect events.connect(event, f, index)\nAdds function *f* to the set of event handlers for *event* at position\n*index*, returning a handler ID for *f*. *event* is an arbitrary event name\nthat does not need to have been previously defined.\n@param event The string event name.\n@param f The Lua function to connect to *event*.\n@param index Optional index to insert the handler into.\n@usage events.connect('my_event', function(msg) gui.print(msg) end)\n@return handler ID.\n@see disconnect constants _SCINTILLA.constants (table)\nMap of Scintilla constant names to their numeric values. @@ -973,7 +973,8 @@ current_pos buffer.current_pos (number)\nThe position of the caret.\nWhen set, d currentdir lfs.currentdir()\nReturns a string with the current working directory or nil plus an error\nstring. cursor buffer.cursor (number)\nThe cursor type.\n\n* `_SCINTILLA.constants.SC_CURSORNORMAL` (-1)\n The normal cursor.\n* `_SCINTILLA.constants.SC_CURSORWAIT` (4)\n The wait cursor.\n\nThe default value is `-1`. cut buffer.cut(buffer)\nCuts the selected text to the clipboard.\nMultiple selections are copied in order with no delimiters. Rectangular\nselections are copied from top to bottom with line ending delimiters. Virtual\nspace is not copied.\n@param buffer The global buffer. -date os.date([format [, time]])\nReturns a string or a table containing date and time, formatted according\nto the given string `format`.\n\nIf the `time` argument is present, this is the time to be formatted\n(see the `os.time` function for a description of this value). Otherwise,\n`date` formats the current time.\n\nIf `format` starts with '`!`', then the date is formatted in Coordinated\nUniversal Time. After this optional character, if `format` is the string\n"`*t`", then `date` returns a table with the following fields: `year` (four\ndigits), `month` (1-12), `day` (1-31), `hour` (0-23), `min` (0-59), `sec`\n(0-61), `wday` (weekday, Sunday is 1), `yday` (day of the year), and `isdst`\n(daylight saving flag, a boolean). This last field may be absent if the\ninformation is not available.\n\nIf `format` is not "`*t`", then `date` returns the date as a string,\nformatted according to the same rules as the C function `strftime`.\n\nWhen called without arguments, `date` returns a reasonable date and time\nrepresentation that depends on the host system and on the current locale\n(that is, `os.date()` is equivalent to `os.date("%c")`).\n\nOn some systems, this function may be not thread safe. +cwd _M.textadept.run.cwd (string, Read-only)\nThe working directory for the most recently executed compile or run\ncommand. +date os.date([format [, time]])\nReturns a string or a table containing date and time, formatted according\nto the given string `format`.\n\nIf the `time` argument is present, this is the time to be formatted\n(see the `os.time` function for a description of this value). Otherwise,\n`date` formats the current time.\n\nIf `format` starts with '`!`', then the date is formatted in Coordinated\nUniversal Time. After this optional character, if `format` is the string\n"`*t`", then `date` returns a table with the following fields: `year` (four\ndigits), `month` (1-12), `day` (1-31), `hour` (0-23), `min` (0-59), `sec`\n(0-61), `wday` (weekday, Sunday is 1), `yday` (day of the year), and `isdst`\n(daylight saving flag, a boolean). This last field may be absent if the\ninformation is not available.\n\nIf `format` is not "`*t`", then `date` returns the date as a string,\nformatted according to the same rules as the ANSI C function `strftime`.\n\nWhen called without arguments, `date` returns a reasonable date and time\nrepresentation that depends on the host system and on the current locale\n(that is, `os.date()` is equivalent to `os.date("%c")`).\n\nOn non-Posix systems, this function may be not thread safe because of its\nreliance on C function `gmtime` and C function `localtime`. debug _G.debug (module)\nLua debug module. debug debug.debug()\nEnters an interactive mode with the user, running each string that\nthe user enters. Using simple commands and other debug facilities,\nthe user can inspect global and local variables, change their values,\nevaluate expressions, and so on. A line containing only the word `cont`\nfinishes this function, so that the caller continues its execution.\n\nNote that commands for `debug.debug` are not lexically nested within any\nfunction and so have no direct access to local variables. dec_num lexer.dec_num (pattern)\nA pattern matching a decimal number. @@ -992,6 +993,7 @@ dialog gui.dialog(kind, ...)\nDisplays a *kind* gtdialog with the given string a difftime os.difftime(t2, t1)\nReturns the number of seconds from time `t1` to time `t2`. In POSIX,\nWindows, and some other systems, this value is exactly `t2`*-*`t1`. digit lexer.digit (pattern)\nA pattern matching 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(utf8_dir, f, filter, exclude_FILTER, recursing)\nIterates over all files and sub-directories in the UTF-8-encoded directory\n*utf8_dir*, calling function *f* on each file found.\nFiles *f* is called on do not match any pattern in string or table *filter*,\nand, unless *exclude_FILTER* is `true`, `FILTER` as well. A filter table\ncontains Lua patterns that match filenames to exclude, with patterns matching\nfolders to exclude listed in a `folders` sub-table. Patterns starting with\n'!' exclude files and folders that do not match the pattern that follows. Use\na table of raw file extensions assigned to an `extensions` key for fast\nfiltering by extension. All strings must be encoded in `_G._CHARSET`, not\nUTF-8.\n@param utf8_dir A UTF-8-encoded directory path to iterate over.\n@param f Function to call with each full file path found. File paths are\n **not** encoded in UTF-8, but in `_G._CHARSET`. If *f* returns `false`\n explicitly, iteration ceases.\n@param filter Optional filter for files and folders to exclude.\n@param exclude_FILTER Optional flag indicating whether or not to exclude the\n default filter `FILTER` in the search. If `false`, adds `FILTER` to\n *filter*.\n The default value is `false` to include the default filter.\n@param recursing Utility flag indicating whether or not this function has\n been recursively called. This flag is used and set internally, and should\n not be set otherwise.\n@see FILTER dirty buffer.dirty (bool)\nWhether or not the buffer has unsaved changes.\nUnlike `buffer.modify`, this field is accessible from any\nbuffer, not just the global one. disconnect events.disconnect(event, id)\nRemoves handler ID *id*, returned by `events.connect()`, from the set of\nevent handlers for *event*.\n@param event The string event name.\n@param id ID of the handler returned by `events.connect()`.\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 The global buffer.\n@param display_line The display line number to use.\n@return number @@ -1024,8 +1026,8 @@ eol_mode buffer.eol_mode (number)\nThe current end of line mode.\n\n* `_SCINTILL error _G.error(message [, level])\nTerminates the last protected function called and returns `message`\nas the error message. 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_detail _M.textadept.run.error_detail (table)\nMap of lexer names to their error string details, tables containing the\nfollowing fields:\n\n + `pattern`: A Lua pattern that matches the language's error string,\n capturing the filename the error occurs in, the line number the error\n occurred on, and optionally the error message.\n + `filename`: The numeric index of the Lua capture containing the filename\n the error occurred in.\n + `line`: The numeric index of the Lua capture containing the line number\n the error occurred on.\n + `message`: (Optional) The numeric index of the Lua capture containing the\n error's message. An annotation will be displayed if a message was\n captured.\n\nWhen an error message is double-clicked, the user is taken to the point of\nerror.\nThis table is usually populated by language-specific modules. events _G.events (module)\nTextadept's core event structure and handlers. -execute os.execute([command])\nThis function is equivalent to the C function `system`. It passes\n`command` to be executed by an operating system shell. Its first result is\n`true` if the command terminated successfully, or `nil` otherwise. After this\nfirst result the function returns a string and a number, as follows:\n "exit": the command terminated normally; the following number is the exit\n status of the command.\n "signal": the command was terminated by a signal; the following number is\n the signal that terminated the command.\n\nWhen called without a `command`, `os.execute` returns a boolean that is true\nif a shell is available. -exit os.exit([code [, close]])\nCalls the C function `exit` to terminate the host program. If `code` is\n`true`, the returned status is `EXIT_SUCCESS`; if `code` is `false`, the\nreturned status is `EXIT_FAILURE`; if `code` is a number, the returned status\nis this number. The default value for `code` is `true`.\n\nIf the optional second argument `close` is true, closes the Lua state before\nexiting. +execute os.execute([command])\nThis function is equivalent to the ANSI C function `system`. It passes\n`command` to be executed by an operating system shell. Its first result is\n`true` if the command terminated successfully, or `nil` otherwise. After this\nfirst result the function returns a string and a number, as follows:\n "exit": the command terminated normally; the following number is the exit\n status of the command.\n "signal": the command was terminated by a signal; the following number is\n the signal that terminated the command.\n\nWhen called without a `command`, `os.execute` returns a boolean that is true\nif a shell is available. +exit os.exit([code [, close]])\nCalls the ANSI C function `exit` to terminate the host program. If `code` is\n`true`, the returned status is `EXIT_SUCCESS`; if `code` is `false`, the\nreturned status is `EXIT_FAILURE`; if `code` is a number, the returned status\nis this number. The default value for `code` is `true`.\n\nIf the optional second argument `close` is true, closes the Lua state before\nexiting. exp math.exp(x)\nReturns the value *e^x*. extend lexer.extend (pattern)\nA pattern matching any ASCII extended character (`0`..`255`). extensions _M.textadept.mime_types.extensions (table)\nMap of file extensions (excluding the leading '.') to their associated\nlexers.\nIf the file type is not recognized by shebang words or first-line patterns,\neach file extension is matched against the file's extension. @@ -1040,7 +1042,7 @@ find gui.find (module)\nTextadept's Find & Replace pane. find string.find(s, pattern [, init [, plain]])\nLooks for the first match of `pattern` in the string `s`. If it finds a\nmatch, then `find` returns the indices of `s` where this occurrence starts\nand ends; otherwise, it returns nil. A third, optional numerical argument\n`init` specifies where to start the search; its default value is 1 and\ncan be negative. A value of true as a fourth, optional argument `plain`\nturns off the pattern matching facilities, so the function does a plain\n"find substring" operation, with no characters in `pattern` being considered\nmagic. Note that if `plain` is given, then `init` must be given as well.\n\nIf the pattern has captures, then in a successful match the captured values\nare also returned, after the two indices. 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 The global buffer.\n@param line The line number in *buffer* to use.\n@param column The column number to use. find_entry_text gui.find.find_entry_text (string)\nThe text in the find entry. -find_in_files gui.find.find_in_files(utf8_dir)\nSearches the *utf8_dir* or user-specified directory for files that match\nsearch text and options and prints the results to a buffer.\nUse the `find_text`, `match_case`, `whole_word`, and `lua` fields to set the\nsearch text and option flags, respectively.\n@param utf8_dir Optional UTF-8-encoded directory name to search. If `nil`,\n the user is prompted for one. +find_in_files gui.find.find_in_files(utf8_dir)\nSearches the *utf8_dir* or user-specified directory for files that match\nsearch text and options and prints the results to a buffer.\nUse the `find_text`, `match_case`, `whole_word`, and `lua` fields to set the\nsearch text and option flags, respectively. Use `FILTER` to set the search\nfilter.\n@param utf8_dir Optional UTF-8-encoded directory path to search. If `nil`,\n the user is prompted for one.\n@see FILTER find_incremental gui.find.find_incremental()\nBegins an incremental find using the command entry.\nOnly the `match_case` find option is recognized. Normal command entry\nfunctionality will be unavailable until the search is finished by pressing\n`Esc` (`⎋` on Mac OSX | `Esc` in ncurses). find_label_text gui.find.find_label_text (string, Write-only)\nThe text of the "Find" label.\nThis is primarily used for localization. find_next gui.find.find_next()\nMimics pressing the "Find Next" button. @@ -1062,7 +1064,7 @@ fold_level buffer.fold_level (table)\nTable of fold level bit-masks for line num fold_line_comments lexer.fold_line_comments(prefix)\nReturns a fold function, to be used within the lexer's `_foldsymbols` table,\nthat folds consecutive line comments beginning with string *prefix*.\n@param prefix The prefix string defining a line comment.\n@usage [l.COMMENT] = {['--'] = l.fold_line_comments('--')}\n@usage [l.COMMENT] = {['//'] = l.fold_line_comments('//')} fold_parent buffer.fold_parent (table, Read-only)\nTable of parent line numbers (fold points) for child line numbers starting\nfrom zero.\nA line number of `-1` means no line was found. form_feed buffer.form_feed(buffer)\nInserts a Form Feed ("\f") character at the caret.\n@param buffer The global buffer. -format string.format(formatstring, ···)\nReturns a formatted version of its variable number of arguments following the\ndescription given in its first argument (which must be a string). The format\nstring follows the same rules as the C function `sprintf`. The only\ndifferences are that the options/modifiers `*`, `h`, `L`, `l`, `n`, and `p`\nare not supported and that there is an extra option, `q`. The `q` option\nformats a string between double quotes, using escape sequences when necessary\nto ensure that it can safely be read back by the Lua interpreter. For\ninstance, the call\n\n string.format('%q', 'a string with "quotes" and \n new line')\n\nmay produce the string:\n\n "a string with \"quotes\" and \\n new line"\n\nOptions `A` and `a` (when available), `E`, `e`, `f`, `G`, and `g` all expect\na number as argument. Options `c`, `d`, `i`, `o`, `u`, `X`, and `x` also\nexpect a number, but the range of that number may be limited by the\nunderlying C implementation. For options `o`, `u`, `X`, and `x`, the number\ncannot be negative. Option `q` expects a string; option `s` expects a string\nwithout embedded zeros. If the argument to option `s` is not a string, it is\nconverted to one following the same rules of `tostring`. +format string.format(formatstring, ···)\nReturns a formatted version of its variable number of arguments following the\ndescription given in its first argument (which must be a string). The format\nstring follows the same rules as the ANSI C function `sprintf`. The only\ndifferences are that the options/modifiers `*`, `h`, `L`, `l`, `n`, and `p`\nare not supported and that there is an extra option, `q`. The `q` option\nformats a string between double quotes, using escape sequences when necessary\nto ensure that it can safely be read back by the Lua interpreter. For\ninstance, the call\n\n string.format('%q', 'a string with "quotes" and \n new line')\n\nmay produce the string:\n\n "a string with \"quotes\" and \\n new line"\n\nOptions `A` and `a` (when available), `E`, `e`, `f`, `G`, and `g` all expect\na number as argument. Options `c`, `d`, `i`, `o`, `u`, `X`, and `x` also\nexpect a number, but the range of that number may be limited by the\nunderlying C implementation. For options `o`, `u`, `X`, and `x`, the number\ncannot be negative. Option `q` expects a string; option `s` expects a string\nwithout embedded zeros. If the argument to option `s` is not a string, it is\nconverted to one following the same rules of `tostring`. frexp math.frexp(x)\nReturns `m` and `e` such that 'x = m2^e', `e` is an integer and the\nabsolute value of `m` is in the range *[0.5, 1)* (or zero when `x` is zero). functions _SCINTILLA.functions (table)\nMap of Scintilla function names to tables containing their IDs, return types,\nwParam types, and lParam types. Types are as follows:\n\n + `0`: Void.\n + `1`: Integer.\n + `2`: Length of the given lParam string.\n + `3`: Integer position.\n + `4`: Color, in "0xBBGGRR" format.\n + `5`: Boolean `true` or `false`.\n + `6`: Bitmask of Scintilla key modifiers and a key value.\n + `7`: String parameter.\n + `8`: String return value. get_apidoc _M.textadept.adeptsense.get_apidoc(sense, symbol)\nReturns a list of apidocs for *symbol* name.\nThe list contains a `pos` key with the index of the apidoc to show.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param symbol The symbol name to get apidocs for.\n@return list of apidocs or `nil` @@ -1088,7 +1090,7 @@ get_text buffer.get_text(buffer)\nReturns all of the text in the buffer and its getenv os.getenv(varname)\nReturns the value of the process environment variable `varname`, or\nnil if the variable is not defined. gethook debug.gethook([thread])\nReturns the current hook settings of the thread, as three values: the\ncurrent hook function, the current hook mask, and the current hook count\n(as set by the `debug.sethook` function). getinfo debug.getinfo([thread, ] f [, what])\nReturns a table with information about a function. You can give the\nfunction directly or you can give a number as the value of `f`, which means\nthe function running at level `f` of the call stack of the given thread:\nlevel 0 is the current function (`getinfo` itself); level 1 is the function\nthat called `getinfo` and so on. If `f` is a number larger than the number of\nactive functions, then `getinfo` returns nil.\n\nThe returned table can contain all the fields returned by `lua_getinfo`,\nwith the string `what` describing which fields to fill in. The default for\n`what` is to get all information available, except the table of valid\nlines. If present, the option '`f`' adds a field named `func` with\nthe function itself. If present, the option '`L`' adds a field named\n`activelines` with the table of valid lines.\n\nFor instance, the expression `debug.getinfo(1,"n").name` returns a table\nwith a name for the current function, if a reasonable name can be found,\nand the expression `debug.getinfo(print)` returns a table with all available\ninformation about the `print` function. -getlocal debug.getlocal([thread, ] f, local)\nThis function returns the name and the value of the local variable with index\n`local` of the function at level `f` of the stack. This function accesses not\nonly explicit local variables, but also parameters, temporaries, etc.\n\nThe first parameter or local variable has index 1, and so on, until the last\nactive variable. Negative indices refer to vararg parameters; -1 is the first\nvararg parameter. The function returns nil if there is no variable with the\ngiven index, and raises an error when called with a level out of range. (You\ncan call `debug.getinfo` to check whether the level is valid.)\n\nVariable names starting with '`(`' (open parentheses) represent internal\nvariables (loop control variables, temporaries, varargs, and C function\nlocals).\n\nThe parameter `f` may also be a function. In that case, `getlocal` returns\nonly the name of function parameters. +getlocal debug.getlocal([thread, ] f, local)\nThis function returns the name and the value of the local variable with index\n`local` of the function at level `f` of the stack. This function accesses not\nonly explicit local variables, but also parameters, temporaries, etc.\n\nThe first parameter or local variable has index 1, and so on, until the last\nactive variable. Negative indices refer to vararg parameters; -1 is the first\nvararg parameter. The function returns nil if there is no variable with the\ngiven index, and raises an error when called with a level out of range. (You\ncan call `debug.getinfo` to check whether the level is valid.)\n\nVariable names starting with '`(`' (open parenthesis) represent internal\nvariables (loop control variables, temporaries, varargs, and C function\nlocals).\n\nThe parameter `f` may also be a function. In that case, `getlocal` returns\nonly the name of function parameters. getmetatable _G.getmetatable(object)\nIf `object` does not have a metatable, returns nil. Otherwise, if the\nobject's metatable has a `"__metatable"` field, returns the associated\nvalue. Otherwise, returns the metatable of the given object. getmetatable debug.getmetatable(value)\nReturns the metatable of the given `value` or nil if it does not have\na metatable. getregistry debug.getregistry()\nReturns the registry table (see §4.5). @@ -1212,15 +1214,15 @@ lines io.lines([filename ···])\nOpens the given file name in read mode and re lines_join buffer.lines_join(buffer)\nJoins the lines in the target range, inserting spaces in-between joined\nwords.\n@param buffer The global buffer. lines_on_screen buffer.lines_on_screen (number, Read-only)\nThe number of completely visible lines in the view.\nIt is possible to have a partial line visible at the bottom of the view. lines_split buffer.lines_split(buffer, pixel_width)\nSplits the lines in the target range into lines of width at most\n*pixel_width* or the width of the view if *pixel_width* is `0`.\n@param buffer The global buffer.\n@param pixel_width The pixel width to split lines at. When `0`, uses the\n width of the view. -load _G.load(ld [, source [, mode [, env]]])\nLoads a chunk.\n\nIf `ld` is a string, the chunk is this string. If `ld` is a function, `load`\ncalls it repeatedly to get the chunk pieces. Each call to `ld` must return a\nstring that concatenates with previous results. A return of an empty string,\nnil, or no value signals the end of the chunk.\n\nIf there are no syntactic errors, returns the compiled chunk as a function;\notherwise, returns <b>nil</b> plus the error message.\n\nIf the resulting function has upvalues, the first upvalue is set to the value\nof the global environment or to `env`, if that parameter is given. When\nloading main chunks, the first upvalue will be the `_ENV` variable\n(see §2.2).\n\n`source` is used as the source of the chunk for error messages and debug\ninformation (see §4.9). When absent, it defaults to `ld`, if `ld` is a\nstring, or to "`=(load)`" otherwise.\n\nThe string `mode` controls whether the chunk can be text or binary (that is,\na precompiled chunk). It may be the string "`b`" (only binary chunks), "`t`"\n(only text chunks), or "`bt`" (both binary and text). The default is "`bt`". +load _G.load(ld [, source [, mode [, env]]])\nLoads a chunk.\n\nIf `ld` is a string, the chunk is this string. If `ld` is a function, `load`\ncalls it repeatedly to get the chunk pieces. Each call to `ld` must return a\nstring that concatenates with previous results. A return of an empty string,\nnil, or no value signals the end of the chunk.\n\nIf there are no syntactic errors, returns the compiled chunk as a function;\notherwise, returns <b>nil</b> plus the error message.\n\nIf the resulting function has upvalues, the first upvalue is set to the value\nof `env`, if that parameter is given, or to the value of the global\nenvironment. (When you load a main chunk, the resulting function will always\nhave exactly one upvalue, the `_ENV` variable (see §2.2). When you load a\nbinary chunk created from a function (see `string.dump`), the resulting\nfunction can have arbitrary upvalues.)\n\n`source` is used as the source of the chunk for error messages and debug\ninformation (see §4.9). When absent, it defaults to `ld`, if `ld` is a\nstring, or to "`=(load)`" otherwise.\n\nThe string `mode` controls whether the chunk can be text or binary (that is,\na precompiled chunk). It may be the string "`b`" (only binary chunks), "`t`"\n(only text chunks), or "`bt`" (both binary and text). The default is "`bt`". load _M.textadept.session.load(filename)\nLoads the Textadept session file *filename* or prompts the user to select\none, returning `true` if the session file was opened and read.\nTextadept restores split views, opened buffers, cursor information, and\nrecent files.\n@param filename Optional absolute path to the session file to load. If `nil`,\n the user is prompted for one.\n@usage _M.textadept.session.load(filename)\n@return `true` if the session file was opened and read; `false` otherwise.\n@see DEFAULT_SESSION load lexer.load(lexer_name)\nInitializes or loads lexer *lexer_name* and returns the lexer object.\nScintilla calls this function to load a lexer. Parent lexers also call this\nfunction to load child lexers and vice-versa.\n@param lexer_name The name of the lexing language.\n@return lexer object load_ctags _M.textadept.adeptsense.load_ctags(sense, tag_file, nolocations)\nLoads the Ctags file *tag_file* for autocompletions.\nIf *nolocations* is `true`, `sense:goto_ctag()` cannot be used with this set\nof tags. It is recommended to pass `-n` to `ctags` in order to use line\nnumbers instead of text patterns to locate tags. This will greatly reduce\nmemory usage for a large number of symbols if `nolocations` is `false`.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param tag_file The path of the Ctags file to load.\n@param nolocations Optional flag indicating whether or not to discard the\n locations of the tags for use by `sense:goto_ctag()`. The default value is\n `false`. load_project _M.rails.load_project(utf8_dir)\nOpens a Rails project for snapopen.\nIf not directory is provided, the user is prompted for one.\n@param utf8_dir The UTF-8 Rails project directory. loaded package.loaded (table)\nA table used by `require` to control which modules are already loaded. When\nyou require a module `modname` and `package.loaded[modname]` is not false,\n`require` simply returns the value stored there.\nThis variable is only a reference to the real table; assignments to this\nvariable do not change the table used by `require`. loadfile _G.loadfile([filename [, mode [, env]]])\nSimilar to `load`, but gets the chunk from file `filename` or from the\nstandard input, if no file name is given. -loadlib package.loadlib(libname, funcname)\nDynamically links the host program with the C library `libname`.\n\nIf `funcname` is "`*`", then it only links with the library, making the\nsymbols exported by the library available to other dynamically linked\nlibraries. Otherwise, it looks for a function `funcname` inside the library\nand returns this function as a C function. (So, `funcname` must follow the\nprototype `lua_CFunction`).\n\nThis is a low-level function. It completely bypasses the package and module\nsystem. Unlike `require`, it does not perform any path searching and does\nnot automatically adds extensions. `libname` must be the complete file name\nof the C library, including if necessary a path and an extension. `funcname`\nmust be the exact name exported by the C library (which may depend on the\nC compiler and linker used).\n\nThis function is not supported by Standard C. As such, it is only available\non some platforms (Windows, Linux, Mac OS X, Solaris, BSD, plus other Unix\nsystems that support the `dlfcn` standard). -locale lpeg.locale([table])\nReturns a table with patterns for matching some character classes according\nto the current locale. The table has fields named alnum, alpha, cntrl, digit,\ngraph, lower, print, punct, space, upper, and xdigit, each one containing a\ncorrespondent pattern. Each pattern matches any single character that belongs\nto its class.\n\nIf called with an argument table, then it creates those fields inside the\ngiven table and returns that table. +loadlib package.loadlib(libname, funcname)\nDynamically links the host program with the C library `libname`.\n\nIf `funcname` is "`*`", then it only links with the library, making the\nsymbols exported by the library available to other dynamically linked\nlibraries. Otherwise, it looks for a function `funcname` inside the library\nand returns this function as a C function. So, `funcname` must follow the\n`lua_CFunction` prototype (see `lua_CFunction`).\n\nThis is a low-level function. It completely bypasses the package and module\nsystem. Unlike `require`, it does not perform any path searching and does\nnot automatically adds extensions. `libname` must be the complete file name\nof the C library, including if necessary a path and an extension. `funcname`\nmust be the exact name exported by the C library (which may depend on the\nC compiler and linker used).\n\nThis function is not supported by Standard C. As such, it is only available\non some platforms (Windows, Linux, Mac OS X, Solaris, BSD, plus other Unix\nsystems that support the `dlfcn` standard). +locale lpeg.locale([table])\nReturns a table with patterns for matching some character classes according\nto the current locale. The table has fields named `alnum`, `alpha`, `cntrl`,\n`digit`, `graph`, `lower`, `print`, `punct`, `space`, `upper`, and `xdigit`,\neach one containing a correspondent pattern. Each pattern matches any single\ncharacter that belongs to its class.\n\nIf called with an argument `table`, then it creates those fields inside the\ngiven table and returns that table. locations _M.textadept.adeptsense.locations (table)\nA list of the locations of known symbols, normally populated by\n`load_ctags()`. lock lfs.lock(filehandle, mode[, start[, length]])\nLocks a file or a part of it. This function works on open files; the file\nhandle should be specified as the first argument. The string mode could be\neither r (for a read/shared lock) or w (for a write/exclusive lock). The\noptional arguments start and length can be used to specify a starting point\nand its length; both should be numbers.\n\nReturns true if the operation was successful; in case of error, it returns\nnil plus an error string. lock_dir lfs.lock_dir(path, [seconds_stale])\nCreates a lockfile (called lockfile.lfs) in path if it does not exist and\nreturns the lock. If the lock already exists checks it it's stale, using the\nsecond parameter (default for the second parameter is INT_MAX, which in\npractice means the lock will never be stale. To free the the lock call\nlock:free().\n\nIn case of any errors it returns nil and the error message. In particular,\nif the lock exists and is not stale it returns the "File exists" message. @@ -1267,7 +1269,7 @@ marker_line_from_handle buffer.marker_line_from_handle(buffer, handle)\nReturns marker_next buffer.marker_next(buffer, start_line, marker_mask)\nReturns the first line number starting at line number *start_line* that has\nall of the markers represented by marker bit-mask *marker_mask* set on, or\n`-1`.\nBit 0 is set if marker 0 is set, bit 1 for marker 1, etc., up to marker 31.\n@param buffer The global buffer.\n@param start_line The start line to search from.\n@param marker_mask The mask of markers to find. Set bit 0 to find marker 0,\n bit 1 for marker 1 and so on.\n@return number marker_previous buffer.marker_previous(buffer, start_line, marker_mask)\nReturns the last line number before or on line number *start_line* that has\nall of the markers represented by marker bit-mask *marker_mask* set on, or\n`-1`.\nBit 0 is set if marker 0 is set, bit 1 for marker 1, etc., up to marker 31.\n@param buffer The global buffer.\n@param start_line The start line to search from.\n@param marker_mask The mask of markers to find. Set bit 0 to find marker 0,\n bit 1 for marker 1 and so on.\n@return number marker_symbol_defined buffer.marker_symbol_defined(buffer, marker_num)\nReturns the symbol defined for marker number *marker_num*, in the range of\n`0` to `31`, used in `buffer:marker_define()`,\n`buffer:marker_define_pixmap()`, or `buffer:marker_define_rgba_image()`.\n@param buffer The global buffer.\n@param marker_num The marker number in the range of `0` to `31` to get the\n symbol of.\n@return number -match lpeg.match(pattern, subject [, init])\nThe matching function. It attempts to match the given pattern against the\nsubject string. If the match succeeds, returns the index in the subject of\nthe first character after the match, or the captured values (if the pattern\ncaptured any value).\n\nAn optional numeric argument init makes the match starts at that position in\nthe subject string. As usual in Lua libraries, a negative value counts from\nthe end.\n\nUnlike typical pattern-matching functions, match works only in anchored mode;\nthat is, it tries to match the pattern with a prefix of the given subject\nstring (at position init), not with an arbitrary substring of the subject.\nSo, if we want to find a pattern anywhere in a string, we must either write a\nloop in Lua or write a pattern that matches anywhere. This second approach is\neasy and quite efficient; see examples. +match lpeg.match(pattern, subject [, init])\nThe matching function. It attempts to match the given pattern against the\nsubject string. If the match succeeds, returns the index in the subject of\nthe first character after the match, or the captured values (if the pattern\ncaptured any value).\n\nAn optional numeric argument `init` makes the match start at that position in\nthe subject string. As usual in Lua libraries, a negative value counts from\nthe end.\n\nUnlike typical pattern-matching functions, match works only in anchored mode;\nthat is, it tries to match the pattern with a prefix of the given subject\nstring (at position `init`), not with an arbitrary substring of the subject.\nSo, if we want to find a pattern anywhere in a string, we must either write a\nloop in Lua or write a pattern that matches anywhere. This second approach is\neasy and quite efficient; see examples. match string.match(s, pattern [, init])\nLooks for the first *match* of `pattern` in the string `s`. If it\nfinds one, then `match` returns the captures from the pattern; otherwise\nit returns nil. If `pattern` specifies no captures, then the whole match\nis returned. A third, optional numerical argument `init` specifies where\nto start the search; its default value is 1 and can be negative. match_brace _M.textadept.editing.match_brace(select)\nGoes to the current character's matching brace, selecting the text in-between\nif *select* is `true`.\n@param select Optional flag indicating whether or not to select the text\n between matching braces. The default value is `false`. match_case gui.find.match_case (bool)\nSearches are case-sensitive.\nThe default value is `false`. @@ -1302,9 +1304,8 @@ next_user_list_type _SCINTILLA.next_user_list_type()\nReturns a unique user list nonnewline lexer.nonnewline (pattern)\nA pattern matching any non-newline character. nonnewline_esc lexer.nonnewline_esc (pattern)\nA pattern matching any non-newline character excluding newlines escaped\nwith '\'. oct_num lexer.oct_num (pattern)\nA pattern matching an octal number. -open _M.textadept.snapopen.open(utf8_paths, filter, exclude_FILTER, depth)\nQuickly open files from the set of directories *utf8_paths* using a filtered\nlist dialog.\nFiles shown in the dialog do not match any pattern in string or table\n*filter*, and, unless *exclude_FILTER* is `true`, `FILTER` as well. A filter\ntable contains Lua patterns that match filenames to exclude. Patterns\nstarting with '!' exclude files that do not match the pattern that follows.\nThe filter may also contain an `extensions` key whose value is a table of\nfile extensions to exclude. Additionally, it may contain a `folders` key\nwhose value is a table of folder names to exclude. Extensions and folder\nnames must be encoded in UTF-8. The number of files in the list is capped at\n`MAX`.\n@param utf8_paths A UTF-8 string directory path or table of UTF-8 directory\n paths to search.\n@param filter Optional filter for files and folders to exclude.\n@param exclude_FILTER Optional flag indicating whether or not to exclude the\n default filter `FILTER` in the search. If `false`, adds `FILTER` to\n *filter*.\n The default value is `false` to include the default filter.\n@param depth Number of directories to recurse into for finding files.\n The default value is `DEFAULT_DEPTH`.\n@usage _M.textadept.snapopen.open(buffer.filename:match('^.+/')) -- list all\n files in the current file's directory, subject to the default filter\n@usage _M.textadept.snapopen.open('/project', '!%.lua$') -- list all Lua\n files in a project directory\n@usage _M.textadept.snapopen.open('/project', {folders = {'build'}}) -- list\n all source files in a project directory\n@see FILTER\n@see DEFAULT_DEPTH\n@see MAX open io.open(filename [, mode])\nThis function opens a file, in the mode specified in the string `mode`. It\nreturns a new file handle, or, in case of errors, nil plus an error message.\n\nThe `mode` string can be any of the following:\n "r": read mode (the default);\n "w": write mode;\n "a": append mode;\n "r+": update mode, all previous data is preserved;\n "w+": update mode, all previous data is erased;\n "a+": append update mode, previous data is preserved, writing is only\n allowed at the end of file.\n\nThe `mode` string can also have a '`b`' at the end, which is needed in\nsome systems to open the file in binary mode. -open_file io.open_file(utf8_filenames)\nOpens *utf8_filenames*, a "\n" delimited string of UTF-8-encoded filenames,\nor user-selected files.\nEmits a `FILE_OPENED` event.\n@param utf8_filenames Optional list of UTF-8-encoded filenames to open. If\n `nil`, the user is prompted with a fileselect dialog.\n@see _G.events +open_file io.open_file(utf8_filenames)\nOpens *utf8_filenames*, a "\n" delimited string of UTF-8-encoded filenames,\nor user-selected files.\nEmits a `FILE_OPENED` event.\n@param utf8_filenames Optional string list of UTF-8-encoded filenames to\n open. If `nil`, the user is prompted with a fileselect dialog.\n@see _G.events open_recent_file io.open_recent_file()\nPrompts the user to open a recently opened file.\n@see recent_files os _G.os (module)\nLua os module. output io.output([file])\nSimilar to `io.input`, but operates over the default output file. @@ -1383,7 +1384,7 @@ register_image buffer.register_image(buffer, type, xpm_data)\nRegisters XPM imag register_rgba_image buffer.register_rgba_image(buffer, type, pixels)\nRegisters RGBA image *pixels* to type number *type* for use in autocompletion\nlists.\nThe dimensions for *pixels*, `buffer.rgba_image_width` and\n`buffer.rgba_image_height`, must be already defined. *pixels* is a sequence\nof 4 byte pixel values (red, blue, green, and alpha) defining the image line\nby line starting at the top-left pixel.\n@param buffer The global buffer.\n@param type Integer type to register the image with.\n@param pixels The RGBA data as described in\n `buffer:marker_define_rgba_image()`. reload buffer.reload(buffer)\nReloads the file in the buffer.\n@param buffer The global buffer. remove os.remove(filename)\nDeletes the file (or empty directory, on POSIX systems) with the given name.\nIf this function fails, it returns nil, plus a string describing the error\nand the error code. -remove table.remove(list [, pos])\nRemoves from `list` the element at position `pos`, shifting down the elements\n`list[pos+1], list[pos+2], ···, list[#list]` and erasing element\n`list[#list]`. Returns the value of the removed element. The default value\nfor `pos` is `#list`, so that a call `table.remove(t)` removes the last\nelement of list `t`. +remove table.remove(list [, pos])\nRemoves from `list` the element at position `pos`, returning the value of the\nremoved element. When `pos` is an integer between 1 and `#list`, it shifts\ndown the elements `list[pos+1], list[pos+2], ···, list[#list]` and erases\nelement `list[#list]`; The index `pos` can also be 0 when `#list` is 0, or\n`#list + 1`; in those cases, the function erases the element `list[pos]`.\n\nThe default value for `pos` is `#list`, so that a call `table.remove(t)`\nremoves the last element of list `t`. rename os.rename(oldname, newname)\nRenames file or directory named `oldname` to `newname`. If this function\nfails, it returns nil, plus a string describing the error and the error code. rep string.rep(s, n [, sep])\nReturns a string that is the concatenation of `n` copies of the string `s`\nseparated by the string `sep`. The default value for `sep` is the empty\nstring (that is, no separator). replace bit32.replace(n, v, field [, width])\nReturns a copy of `n` with the bits `field` to `field + width - 1` replaced\nby the value `v`. See `bit32.extract` for details about `field` and `width`. @@ -1422,8 +1423,9 @@ save buffer.save(buffer)\nSaves the buffer to the file.\nEmits `FILE_BEFORE_SAVE save_all io.save_all()\nSaves all unsaved buffers to their respective files.\n@see buffer.save save_as buffer.save_as(buffer, utf8_filename)\nSaves the buffer to the *utf8_filename* or user-specified filename.\nEmits a `FILE_SAVED_AS` event.\n@param buffer The global buffer.\n@param utf8_filename The new filepath to save the buffer to. Must be UTF-8\n encoded.\n@see _G.events scroll_caret buffer.scroll_caret(buffer)\nScrolls the caret into view based on the policies set with\n`buffer:set_x_caret_policy()` and `buffer:set_y_caret_policy()`.\n@param buffer The global buffer.\n@see set_x_caret_policy\n@see set_y_caret_policy -scroll_to_end buffer.scroll_to_end(buffer)\nScroll to the end of the buffer without moving the caret.\n@param buffer The global buffer. -scroll_to_start buffer.scroll_to_start(buffer)\nScroll to the beginning of the buffer without moving the caret.\n@param buffer The global buffer. +scroll_range buffer.scroll_range(buffer, secondary_pos, primary_pos)\nScrolls the range between *primary_pos* and *secondary_pos* into view, with\npriority given to *primary_pos*.\nSimilar to `buffer:scroll_caret()`, but with *primary_pos* instead of\n`buffer.current_pos`.\nThis is useful for scrolling search results into view.\n@param buffer The global buffer.\n@param secondary_pos The secondary range position to scroll into view.\n@param primary_pos The primary range position to scroll into view. +scroll_to_end buffer.scroll_to_end(buffer)\nScrolls to the end of the buffer without moving the caret.\n@param buffer The global buffer. +scroll_to_start buffer.scroll_to_start(buffer)\nScrolls to the beginning of the buffer without moving the caret.\n@param buffer The global buffer. scroll_width buffer.scroll_width (number)\nThe assumed buffer width for horizontal scrolling purposes.\nFor performance, the view does not measure the display width of the buffer\nto determine the properties of the horizontal scroll bar, but uses an\nassumed width instead. To ensure the width of the currently visible lines\ncan be scrolled use\n`buffer.scroll_width_tracking`.\nThe default value is `2000`. scroll_width_tracking buffer.scroll_width_tracking (bool)\nSet the scroll width to the maximum width of a displayed line beyond\n`buffer.scroll_width`.\nThe default value is `false`. search_anchor buffer.search_anchor(buffer)\nSets the current position to anchor subsequent searches with\n`buffer:search_next()` and `buffer:search_prev()`.\n@param buffer The global buffer. @@ -1505,7 +1507,7 @@ set_x_caret_policy buffer.set_x_caret_policy(buffer, caret_policy, caret_slop)\n set_y_caret_policy buffer.set_y_caret_policy(buffer, caret_policy, caret_slop)\nSet the way the line the caret is on is kept visible.\n@param buffer The global buffer.\n@param caret_policy The combination of `_SCINTILLA.constants.CARET_SLOP`\n (0x01), `_SCINTILLA.constants.CARET_STRICT` (0x04),\n `_SCINTILLA.constants.CARET_EVEN` (0x08), and\n `_SCINTILLA.constants.CARET_JUMPS` (0x10) policy flags to set.\n@param caret_slop The slop value to use. sethook debug.sethook([thread, ] hook, mask [, count])\nSets the given function as a hook. The string `mask` and the number\n`count` describe when the hook will be called. The string mask may have\nthe following characters, with the given meaning:\n "c": the hook is called every time Lua calls a function;\n "r": the hook is called every time Lua returns from a function;\n "l": the hook is called every time Lua enters a new line of code.\n\nWith a `count` different from zero, the hook is called after every `count`\ninstructions.\n\nWhen called without arguments, `debug.sethook` turns off the hook.\n\nWhen the hook is called, its first parameter is a string describing\nthe event that has triggered its call: `"call"` (or `"tail call"`),\n`"return"`, `"line"`, and `"count"`. For line events, the hook also gets the\nnew line number as its second parameter. Inside a hook, you can call\n`getinfo` with level 2 to get more information about the running function\n(level 0 is the `getinfo` function, and level 1 is the hook function). setlocal debug.setlocal([thread, ] level, local, value)\nThis function assigns the value `value` to the local variable with\nindex `local` of the function at level `level` of the stack. The function\nreturns nil if there is no local variable with the given index, and raises\nan error when called with a `level` out of range. (You can call `getinfo`\nto check whether the level is valid.) Otherwise, it returns the name of\nthe local variable.\n\nSee `debug.getlocal` for more information about variable indices and names. -setlocale os.setlocale(locale [, category])\nSets the current locale of the program. `locale` is a system-dependent string\nspecifying a locale; `category` is an optional string describing which\ncategory to change: `"all"`, `"collate"`, `"ctype"`, `"monetary"`,\n`"numeric"`, or `"time"`; the default category is `"all"`. The function\nreturns the name of the new locale, or nil if the request cannot be honored.\n\nIf `locale` is the empty string, the current locale is set to an\nimplementation-defined native locale. If `locale` is the string "`C`",\nthe current locale is set to the standard C locale.\n\nWhen called with nil as the first argument, this function only returns\nthe name of the current locale for the given category. +setlocale os.setlocale(locale [, category])\nSets the current locale of the program. `locale` is a system-dependent string\nspecifying a locale; `category` is an optional string describing which\ncategory to change: `"all"`, `"collate"`, `"ctype"`, `"monetary"`,\n`"numeric"`, or `"time"`; the default category is `"all"`. The function\nreturns the name of the new locale, or nil if the request cannot be honored.\n\nIf `locale` is the empty string, the current locale is set to an\nimplementation-defined native locale. If `locale` is the string "`C`",\nthe current locale is set to the standard C locale.\n\nWhen called with nil as the first argument, this function only returns\nthe name of the current locale for the given category.\n\nThis function may not be thread safe because of its reliance on C function\n`setlocale`. setmaxstack lpeg.setmaxstack(max)\nSets the maximum size for the backtrack stack used by LPeg to track calls and\nchoices. Most well-written patterns need little backtrack levels and\ntherefore you seldom need to change this maximum; but a few useful patterns\nmay need more space. Before changing this maximum you should try to rewrite\nyour pattern to avoid the need for extra space. setmetatable _G.setmetatable(table, metatable)\nSets the metatable for the given table. (You cannot change the metatable\nof other types from Lua, only from C.) If `metatable` is nil, removes the\nmetatable of the given table. If the original metatable has a `"__metatable"`\nfield, raises an error.\n\nThis function returns `table`. setmetatable debug.setmetatable(value, table)\nSets the metatable for the given `value` to the given `table` (which\ncan be nil). @@ -1522,7 +1524,7 @@ singular _M.rails.singular\nA map of plural controller names to their singulars. sinh math.sinh(x)\nReturns the hyperbolic sine of `x`. size gui.size (table)\nA table containing the width and height values of the Textadept window. size view.size (number)\nThe position of the split resizer (if this view is part of a split view). -snapopen _M.textadept.snapopen (module)\nQuickly open files in a set of directories using a filtered list dialog. +snapopen io.snapopen(utf8_paths, filter, exclude_FILTER, ...)\nQuickly open files from *utf8_paths*, a "\n" delimited string of\nUTF-8-encoded directory paths, using a filtered list dialog.\nFiles shown in the dialog do not match any pattern in string or table\n*filter*, and, unless *exclude_FILTER* is `true`, `lfs.FILTER` as well. A\nfilter table contains Lua patterns that match filenames to exclude, with\npatterns matching folders to exclude listed in a `folders` sub-table.\nPatterns starting with '!' exclude files and folders that do not match the\npattern that follows. Use a table of raw file extensions assigned to an\n`extensions` key for fast filtering by extension. All strings must be encoded\nin `_G._CHARSET`, not UTF-8. The number of files in the list is capped at\n`SNAPOPEN_MAX`.\n@param utf8_paths String list of UTF-8-encoded directory paths to search.\n@param filter Optional filter for files and folders 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 ... Optional additional parameters to pass to `gui.dialog()`.\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 lfs.FILTER\n@see SNAPOPEN_MAX 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 `_M.textadept.snippets` module. snippets _M.textadept.snippets (module)\nSnippets for Textadept. sort table.sort(list [, comp])\nSorts list elements in a given order, *in-place*, from `list[1]` to\n`list[#list]`. If `comp` is given, then it must be a function that receives\ntwo list elements and returns true when the first element must come before\nthe second in the final order (so that `not comp(list[i+1],list[i])` will be\ntrue after the sort). If `comp` is not given, then the standard Lua operator\n`<` is used instead.\n\nThe sort algorithm is not stable; that is, elements considered equal by the\ngiven order may have their relative positions changed by the sort. |