From 8937d4f64976af2113def164095c9a5305308843 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 23 Jun 2011 19:36:53 -0400 Subject: Write Lua table and module apidoc and fix absolute table tags. An absolute table like '_G.keys.lua' used to be tagged as belonging to the '_m.lua' module, but it is tagged properly now. --- modules/lua/api | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) (limited to 'modules/lua/api') diff --git a/modules/lua/api b/modules/lua/api index af083b29..8821eea7 100644 --- a/modules/lua/api +++ b/modules/lua/api @@ -1,3 +1,4 @@ +_G _G._G [module]\nLua _G module.\n new_buffer _G.new_buffer()\nCreates a new buffer. Activates the 'buffer_new' signal.\n@return the new buffer.\n quit _G.quit()\nQuits Textadept.\n reset _G.reset()\nResets the Lua state by reloading all init scripts. Language-specific modules\nfor opened files are NOT reloaded. Re-opening the files that use them will\nreload those modules. This function is useful for modifying init scripts\n(such as keys.lua) on the fly without having to restart Textadept. A global\nRESETTING variable is set to true when re-initing the Lua State. Any scripts\nthat need to differentiate between startup and reset can utilize this variable.\n @@ -37,6 +38,9 @@ tostring _G.tostring(e)\nReceives an argument of any type and converts it to a s type _G.type(v)\nReturns the type of its only argument, coded as a string. The possible results\nof this function are " `nil`" (a string, not the value nil), "`number`",\n"`string`", "`boolean`", "`table`", "`function`", "`thread`", and "`userdata`".\n unpack _G.unpack(list [, i [, j]])\nReturns the elements from the given table. This function is equivalent to\nreturn list[i], list[i+1], ···, list[j] except that the above code can\nbe written only for a fixed number of elements. By default, `i` is 1 and\n`j` is the length of the list, as defined by the length operator (see §2.5.5).\n xpcall _G.xpcall(f, err)\nThis function is similar to `pcall`, except that you can set a new error\nhandler. `xpcall` calls function `f` in protected mode, using `err` as the\nerror handler. Any error inside `f` is not propagated; instead, `xpcall`\ncatches the error, calls the `err` function with the original error object,\nand returns a status code. Its first result is the status code (a boolean),\nwhich is true if the call succeeds without errors. In this case, `xpcall`\nalso returns all results from the call, after this first result. In case of\nany error, `xpcall` returns false plus the result from `err`.\n +_BUFFERS _G._BUFFERS [table]\nA numerically indexed table of open buffers in Textadept.\n +_VIEWS _G._VIEWS [table]\nA numerically indexed table of views in Textadept.\n +arg _G.arg [table]\nCommand line parameters.\n _HOME _G._HOME [string]\nPath to the directory containing Textadept.\n _LEXERPATH _G._LEXERPATH [string]\nPaths to lexers, formatted like `package.path`.\n _RELEASE _G._RELEASE [string]\nThe Textadept release version.\n @@ -48,9 +52,11 @@ WIN32 _G.WIN32 [bool]\nIf Textadept is running on Windows, this flag is `true`.\ OSX _G.OSX [bool]\nIf Textadept is running on Mac OSX, this flag is `true`.\n _G _G._G\nA global variable (not a function) that holds the global environment\n(that is, `_G._G = _G`). Lua itself does not use this variable; changing\nits value does not affect any environment, nor vice-versa. (Use `setfenv`\nto change environments.)\n _VERSION _G._VERSION\nA global variable (not a function) that holds a string containing the current\ninterpreter version. The current contents of this variable is "`Lua 5.1`".\n +_SCINTILLA _G._SCINTILLA [module]\nScintilla constants, functions, and properties. Do not modify anything in\nthis module. Doing so will result in instability.\n next_indic_number _SCINTILLA.next_indic_number()\nReturns a unique indicator number. Use this function for custom indicators\nin order to prevent clashes with identifiers of other custom indicators.\n@usage local indic_num = _SCINTILLA.next_indic_number()\n next_marker_number _SCINTILLA.next_marker_number()\nReturns a unique marker number. Use this function for custom markers in\norder to prevent clashes with identifiers of other custom markers.\n@usage local marknum = _SCINTILLA.next_marker_number()\n@see buffer.marker_define\n next_user_list_type _SCINTILLA.next_user_list_type()\nReturns a unique user list type. Use this function for custom user lists in\norder to prevent clashes with type identifiers of other custom user lists.\n@usage local list_type = _SCINTILLA.next_user_list_type()\n@see buffer.user_list_show\n +constants _SCINTILLA.constants [table]\nScintilla constants.\n ANNOTATION_BOXED _SCINTILLA.constants.ANNOTATION_BOXED\n2\n ANNOTATION_HIDDEN _SCINTILLA.constants.ANNOTATION_HIDDEN\n0\n ANNOTATION_STANDARD _SCINTILLA.constants.ANNOTATION_STANDARD\n1\n @@ -647,30 +653,64 @@ SCLEX_CONTAINER _SCINTILLA.constants.SCLEX_CONTAINER\n0\n SCLEX_AUTOMATIC _SCINTILLA.constants.SCLEX_AUTOMATIC\n1000\n SCLEX_LPEG _SCINTILLA.constants.SCLEX_LPEG\n999\n SCLEX_NULL _SCINTILLA.constants.SCLEX_NULL\n1\n +functions _SCINTILLA.functions [table]\nScintilla functions.\n +properties _SCINTILLA.properties [table]\nScintilla properties.\n +_m _G._m [module]\nA table of loaded modules.\n +cpp _m.cpp [module]\nThe cpp module. It provides utilities for editing C/C++ code. User tags\nare loaded from _USERHOME/modules/cpp/tags and user apis are loaded from\n_USERHOME/modules/cpp/api.\n set_buffer_properties _m.cpp.set_buffer_properties()\nSets default buffer properties for C/C++ files.\n +cpp _G.keys.cpp [table]\nContainer for C/C++-specific key commands.\n +cpp _G.snippets.cpp [table]\nContainer for C/C++-specific snippets.\n sense _m.cpp.sense\nThe C/C++ Adeptsense.\n +css _m.css [module]\nThe css module. It provides utilities for editing CSS code. User tags\nare loaded from _USERHOME/modules/css/tags and user apis are loaded from\n_USERHOME/modules/css/api.\n set_buffer_properties _m.css.set_buffer_properties()\nSets default buffer properties for CSS files.\n +css _G.keys.css [table]\nContainer for CSS-specific key commands.\n +css _G.snippets.css [table]\nContainer for CSS-specific snippets.\n sense _m.css.sense\nThe CSS Adeptsense.\n +hypertext _m.hypertext [module]\nThe hypertext module. It provides utilities for editing HTML code. User tags\nare loaded from _USERHOME/modules/hypertext/tags and user apis are loaded\nfrom _USERHOME/modules/hypertext/api.\n set_buffer_properties _m.hypertext.set_buffer_properties()\nSets default buffer properties for HTML files.\n +hypertext _G.keys.hypertext [table]\nContainer for HTML-specific key commands.\n +hypertext _G.snippets.hypertext [table]\nContainer for HTML-specific snippets.\n sense _m.hypertext.sense\nThe HTML Adeptsense.\n +java _m.java [module]\nThe java module. It provides utilities for editing Java code. User tags\nare loaded from _USERHOME/modules/java/tags and user apis are loaded from\n_USERHOME/modules/java/api.\n set_buffer_properties _m.java.set_buffer_properties()\nSets default buffer properties for Java files.\n +java _G.keys.java [table]\nContainer for Java-specific key commands.\n +java _G.snippets.java [table]\nContainer for Java-specific snippets.\n sense _m.java.sense\nThe Java Adeptsense.\n +lua _m.lua [module]\nThe lua module. It provides utilities for editing Lua code. User tags\nare loaded from _USERHOME/modules/lua/tags and user apis are loaded from\n_USERHOME/modules/lua/api.\n goto_required _m.lua.goto_required()\nDetermines the Lua file being 'require'd, searches through package.path for\nthat file, and opens it in Textadept.\n set_buffer_properties _m.lua.set_buffer_properties()\nSets default buffer properties for Lua files.\n try_to_autocomplete_end _m.lua.try_to_autocomplete_end()\nTries to autocomplete Lua's 'end' keyword for control structures like 'if',\n'while', 'for', etc.\n@see control_structure_patterns\n +lua _G.keys.lua [table]\nContainer for Lua-specific key commands.\n +lua _G.snippets.lua [table]\nContainer for Lua-specific snippets.\n +control_structure_patterns _m.lua.control_structure_patterns [table]\nPatterns for auto 'end' completion for control structures.\n@see try_to_autocomplete_end\n sense _m.lua.sense\nThe Lua Adeptsense.\n +php _m.php [module]\nThe php module. It provides utilities for editing PHP code. User tags\nare loaded from _USERHOME/modules/php/tags and user apis are loaded from\n_USERHOME/modules/php/api.\n goto_required _m.php.goto_required()\nDetermines the PHP file being 'require'd or 'include'd, and opens it in\nTextadept.\n set_buffer_properties _m.php.set_buffer_properties()\nSets default buffer properties for PHP files.\n +php _G.keys.php [table]\nContainer for PHP-specific key commands.\n +php _G.snippets.php [table]\nContainer for PHP-specific snippets.\n sense _m.php.sense\nThe PHP Adeptsense.\n +rails _m.rails [module]\nThe rails module. It provides utilities for editing Ruby on Rails code. User\ntags are loaded from _USERHOME/modules/rails/tags and user apis are loaded\nfrom _USERHOME/modules/rails/api.\n load_project _m.rails.load_project(utf8_dir)\nSets _G.keys.al.o to snapopen a Rails project. If not directory is provided,\nthe user is prompted for one.\n@param utf8_dir The UTF-8 Rails project directory.\n +rails _G.keys.rails [table]\nContainer for Rails-specific key commands.\n +rails _G.snippets.rails [table]\nContainer for Rails-specific snippets.\n sense _m.rails.sense\nThe Rails Adeptsense.\n singular _m.rails.singular\nA map of plural controller names to their singulars. Add key-value pairs to\nthis if singularize() is incorrectly converting your plural controller name\nto its singular model name.\n +rhtml _m.rhtml [module]\nThe RHTML module. It provides utilities for editing RHTML. User tags are\nloaded from _USERHOME/modules/rhtml/tags and user apis are loaded from\n_USERHOME/modules/rhtml/api.\n +rhtml _G.keys.rhtml [table]\nContainer for RHTML-specific key commands.\n +rhtml _G.snippets.rhtml [table]\nContainer for RHTML-specific snippets.\n sense _m.rhtml.sense\nThe RHTML Adeptsense.\n +ruby _m.ruby [module]\nThe ruby module. It provides utilities for editing Ruby code. User tags\nare loaded from _USERHOME/modules/ruby/tags and user apis are loaded from\n_USERHOME/modules/ruby/api.\n goto_required _m.ruby.goto_required()\nDetermine the Ruby file being 'require'd, and search through the RUBYPATH\nfor that file and open it in Textadept.\n set_buffer_properties _m.ruby.set_buffer_properties()\nSets default buffer properties for Ruby files.\n toggle_block _m.ruby.toggle_block()\nToggles between { ... } and do ... end Ruby blocks. If the caret is inside\na { ... } single-line block, that block is converted to a multiple-line do\n.. end block. If the caret is on a line that contains single-line do ... end\nblock, that block is converted to a single-line { ... } block. If the caret\nis inside a multiple-line do ... end block, that block is converted to a\nsingle-line { ... } block with all newlines replaced by a space. Indentation\nis important. The 'do' and 'end' keywords must be on lines with the same\nlevel of indentation to toggle correctly\n try_to_autocomplete_end _m.ruby.try_to_autocomplete_end()\nTries to autocomplete Ruby's 'end' keyword for control structures like 'if',\n'while', 'for', etc.\n@see control_structure_patterns\n +ruby _G.keys.ruby [table]\nContainer for Ruby-specific key commands.\n +ruby _G.snippets.ruby [table]\nContainer for Ruby-specific snippets.\n +control_structure_patterns _m.ruby.control_structure_patterns [table]\nPatterns for auto 'end' completion for control structures.\n@see try_to_autocomplete_end\n sense _m.ruby.sense\nThe Ruby Adeptsense.\n +textadept _m.textadept [module]\nThe textadept module. It provides utilities for editing text in Textadept.\n +adeptsense _m.textadept.adeptsense [module]\nLanguage autocompletion support for the textadept module.\n add_trigger _m.textadept.adeptsense.add_trigger(sense, c, only_fields, only_functions)\nSets the trigger for autocompletion.\n@param sense The adeptsense returned by adeptsense.new().\n@param c The character(s) that triggers the autocompletion. You can have up\nto two characters.\n@param only_fields If true, this trigger only completes fields. Defaults\nto false.\n@param only_functions If true, this trigger only completes functions. Defaults\nto false.\n@usage sense:add_trigger('.')\n@usage sense:add_trigger(':', false, true) -- only functions\n@usage sense:add_trigger('->')\n clear _m.textadept.adeptsense.clear(sense)\nClears an adeptsense. This is necessary for loading a new ctags file or\ncompletions from a different project.\n@param sense The adeptsense returned by adeptsense.new().\n complete _m.textadept.adeptsense.complete(sense, only_fields, only_functions)\nShows an autocompletion list for the symbol behind the caret.\n@param sense The adeptsense returned by adeptsense.new().\n@param only_fields If true, returns list of only fields; defaults to false.\n@param only_functions If true, returns list of only functions; defaults\nto false.\n@return true on success or false.\n@see get_symbol\n@see get_completions\n @@ -684,6 +724,12 @@ handle_ctag _m.textadept.adeptsense.handle_ctag(sense, tag_name, file_name, ex_c load_ctags _m.textadept.adeptsense.load_ctags(sense, tag_file, nolocations)\nLoads the given ctags file for autocompletion. It is recommended to pass '-n'\nto ctags in order to use line numbers instead of text patterns to locate\ntags. This will greatly reduce memory usage for a large number of symbols\nif nolocations is not true.\n@param sense The adeptsense returned by adeptsense.new().\n@param tag_file The path of the ctags file to load.\n@param nolocations If true, does not store the locations of the tags for\nuse by goto_ctag(). Defaults to false.\n new _m.textadept.adeptsense.new(lang)\nCreates a new adeptsense for the given lexer language. Only one sense can\nexist per language.\n@param lang The lexer language to create an adeptsense for.\n@usage local lua_sense = _m.textadept.adeptsense.new('lua')\n@return adeptsense.\n show_apidoc _m.textadept.adeptsense.show_apidoc(sense)\nShows a calltip with API documentation for the symbol behind the caret.\n@param sense The adeptsense returned by adeptsense.new().\n@return true on success or false.\n@see get_symbol\n@see get_apidoc\n +api_files _m.textadept.adeptsense.api_files [table]\nContains a list of api files used by show_apidoc(). Each line in the api file\ncontains a symbol name (not the full symbol) followed by a space character\nand then the symbol's documentation. Since there may be many duplicate symbol\nnames, it is recommended to put the full symbol and arguments, if any, on the\nfirst line. (e.g. Class.function(arg1, arg2, ...)). This allows the correct\ndocumentation to be shown based on the current context. In the documentation,\nnewlines are represented with '\\n'. A '\' before '\\n' escapes the newline.\n +completions _m.textadept.adeptsense.completions [table]\nContains lists of possible completions for known symbols. Each symbol key\nhas a table value that contains a list of field completions with a `fields`\nkey and a list of functions completions with a `functions` key. This table\nis normally populated by load_ctags(), but can also be set by the user.\n +ctags_kinds _m.textadept.adeptsense.ctags_kinds [table]\nContains a map of ctags kinds to adeptsense kinds. Recognized kinds are\n'functions', 'fields', and 'classes'. Classes are quite simply containers\nfor functions and fields so Lua modules would count as classes. Any other\nkinds will be passed to handle_ctag() for user-defined handling.\n@see handle_ctag\n +inherited_classes _m.textadept.adeptsense.inherited_classes [table]\nContains a map of classes and a list of their inherited classes.\n +locations _m.textadept.adeptsense.locations [table]\nContains the locations of known symbols. This table is populated by\nload_ctags().\n +syntax _m.textadept.adeptsense.syntax [table]\nContains syntax-specific values for the language.\n@see get_class\n self _m.textadept.adeptsense.syntax.self\nThe language's syntax-equivalent of 'self'. Default is 'self'.\n class_definition _m.textadept.adeptsense.syntax.class_definition\nA Lua pattern representing the language's class definition syntax. The first\ncapture returned must be the class name. A second, optional capture contains\nthe class' superclass (if any). If no completions are found for the class\nname, completions for the superclass are shown (if any). Completions will\nnot be shown for both a class and superclass unless defined in a previously\nloaded ctags file. Also, multiple superclasses cannot be recognized by this\npattern; use a ctags file instead. Defaults to 'class%s+([%w_]+)'.\n word_chars _m.textadept.adeptsense.syntax.word_chars\nA Lua pattern of characters allowed in a word. Default is '%w_'.\n @@ -694,6 +740,7 @@ type_assignments _m.textadept.adeptsense.syntax.type_assignments\nA map of Lua p always_show_globals _m.textadept.adeptsense.always_show_globals [bool]\nInclude globals in the list of completions offered. Globals are classes,\nfunctions, and fields that do not belong to another class. They are contained\nin `completions['']`. The default value is `true`.\n FUNCTIONS _m.textadept.adeptsense.FUNCTIONS [string]\nXPM image for adeptsense functions.\n FIELDS _m.textadept.adeptsense.FIELDS [string]\nXPM image for adeptsense fields.\n +bookmarks _m.textadept.bookmarks [module]\nBookmarks for the textadept module.\n add _m.textadept.bookmarks.add()\nAdds a bookmark to the current line.\n clear _m.textadept.bookmarks.clear()\nClears all bookmarks in the current buffer.\n goto _m.textadept.bookmarks.goto()\nGoes to selected bookmark from a filtered list.\n @@ -702,6 +749,7 @@ goto_prev _m.textadept.bookmarks.goto_prev()\nGoes to the previous bookmark in t remove _m.textadept.bookmarks.remove()\nClears the bookmark at the current line.\n toggle _m.textadept.bookmarks.toggle()\nToggles a bookmark on the current line.\n MARK_BOOKMARK_COLOR _m.textadept.bookmarks.MARK_BOOKMARK_COLOR [number]\nThe color used for a bookmarked line in 0xBBGGRR format.\n +editing _m.textadept.editing [module]\nEditing commands for the textadept module.\n autocomplete_word _m.textadept.editing.autocomplete_word(word_chars)\nPops up an autocompletion list for the current word based on other words in\nthe document.\n@param word_chars String of chars considered to be part of words.\n@return true if there were completions to show; false otherwise.\n block_comment _m.textadept.editing.block_comment(comment)\nBlock comments or uncomments code with a given comment string.\n@param comment The comment string inserted or removed from the beginning of\neach line in the selection.\n convert_indentation _m.textadept.editing.convert_indentation()\nConverts indentation between tabs and spaces.\n @@ -719,6 +767,9 @@ select_line _m.textadept.editing.select_line()\nSelects the current line.\n select_paragraph _m.textadept.editing.select_paragraph()\nSelects the current paragraph. Paragraphs are delimited by two or more\nconsecutive newlines.\n select_scope _m.textadept.editing.select_scope()\nSelects all text with the same style as under the caret.\n transpose_chars _m.textadept.editing.transpose_chars()\nTransposes characters intelligently. If the caret is at the end of a line,\nthe two characters before the caret are transposed. Otherwise, the characters\nto the left and right are.\n +braces _m.textadept.editing.braces [table]\nHighlighted brace characters. Keys are lexer language names and values\nare tables of characters that count as brace characters. This table can be\npopulated by language-specific modules.\n +char_matches _m.textadept.editing.char_matches [table]\nAuto-matched characters. Used for auto-matching parentheses, brackets, braces,\nquotes, etc. Keys are lexer language names and values are tables of character\nmatch pairs. This table can be populated by language-specific modules.\n +comment_string _m.textadept.editing.comment_string [table]\nComment strings for various lexer languages. Used for the block_comment()\nfunction. Keys are lexer language names and values are the line comment\ndelimiters for the language. This table is typically populated by\nlanguage-specific modules.\n@see block_comment\n AUTOPAIR _m.textadept.editing.AUTOPAIR [bool]\nOpening `(`, `[`, `[`, `"`, or `'` characters are automatically closed. The\ndefault value is `true`.\n HIGHLIGHT_BRACES _m.textadept.editing.HIGHLIGHT_BRACES [bool]\nHighlight matching '()[]{}<>' characters. The default value is `true`.\n AUTOINDENT _m.textadept.editing.AUTOINDENT [bool]\nMatch the indentation level of the previous line when pressing the Enter\nkey. The default value is `true`.\n @@ -726,28 +777,48 @@ SAVE_STRIPS_WS _m.textadept.editing.SAVE_STRIPS_WS [bool]\nStrip trailing whites MARK_HIGHLIGHT_BACK _m.textadept.editing.MARK_HIGHLIGHT_BACK [number]\nThe background color used for a line containing a highlighted word in\n0xBBGGRR format.\n INDIC_HIGHLIGHT_BACK _m.textadept.editing.INDIC_HIGHLIGHT_BACK [number]\nThe color used for an indicator for a highlighted word in 0xBBGGRR format.\n INDIC_HIGHLIGHT_ALPHA _m.textadept.editing.INDIC_HIGHLIGHT_ALPHA [number]\nThe alpha transparency value between 0 (transparent) and 255 (opaque) used\nfor an indicator for a highlighted word. The default value is 100.\n +filter_through _m.textadept.filter_through [module]\nFilter-Through for the textadept module.\n filter_through _m.textadept.filter_through.filter_through()\nPrompts for a Linux, Mac OSX, or Windows shell command to filter text\nthrough. The standard input (stdin) for shell commands is determined as\nfollows: (1) If text is selected and spans multiple lines, all text on the\nlines containing the selection is used. However, if the end of the selection\nis at the beginning of a line, only the EOL (end of line) characters from the\nprevious line are included as input. The rest of the line is excluded. (2) If\ntext is selected and spans a single line, only the selected text is used. (3)\nIf no text is selected, the entire buffer is used. The input text is replaced\nwith the standard output (stdout) of the command.\n +keys _m.textadept.keys [module]\nDefines key commands for Textadept. This set of key commands is pretty\nstandard among other text editors.\n +menu _m.textadept.menu [module]\nProvides dynamic menus for Textadept. This module, like _m.textadept.keys,\nshould be 'require'ed last.\n set_contextmenu _m.textadept.menu.set_contextmenu(menu_table)\nSets gui.context_menu from the given menu table.\n@param menu_table The menu table to create the context menu from. Each table\nentry is either a submenu or menu text and an action table.\n@see set_menubar\n set_menubar _m.textadept.menu.set_menubar(menubar)\nSets gui.menubar from the given table of menus.\n@param menubar The table of menus to create the menubar from. Each table\nentry is another table that corresponds to a particular menu. A menu can\nhave a 'title' key with string value. Each menu item is either a submenu\n(another menu table) or a table consisting of two items: string menu text\nand an action table just like `_G.keys`'s action table. If the menu text is\n'separator', a menu separator is created and no action table is required.\n +context_menu _m.textadept.menu.context_menu [table]\nContains the right-click context menu.\n +menubar _m.textadept.menu.menubar [table]\nContains the main menubar.\n +mime_types _m.textadept.mime_types [module]\nHandles file-specific settings.\n select_lexer _m.textadept.mime_types.select_lexer()\nPrompts the user to select a lexer from a filtered list for the current buffer.\n +extensions _m.textadept.mime_types.extensions [table]\nFile extensions with their associated lexers.\n +lexers _m.textadept.mime_types.lexers [table]\nList of detected lexers. Lexers are read from `lexers/` and\n`~/.textadept/lexers/`.\n +patterns _m.textadept.mime_types.patterns [table]\nFirst-line patterns and their associated lexers.\n +shebangs _m.textadept.mime_types.shebangs [table]\nShebang words and their associated lexers.\n +run _m.textadept.run [module]\nModule for running/executing source files. Typically, language-specific\nmodules populate the 'compile_command', 'run_command', and 'error_detail'\ntables for a particular language's file extension.\n compile _m.textadept.run.compile()\nCompiles the file as specified by its extension in the compile_command table.\n@see compile_command\n execute _m.textadept.run.execute(command)\nExecutes the command line parameter and prints the output to Textadept.\n@param command The command line string. It can have the following macros: *\n%(filepath) The full path of the current file. * %(filedir) The current file's\ndirectory path. * %(filename) The name of the file including extension. *\n%(filename_noext) The name of the file excluding extension.\n goto_error _m.textadept.run.goto_error(pos, line_num)\nWhen the user double-clicks an error message, go to the line in the file\nthe error occured at and display a calltip with the error message.\n@param pos The position of the caret.\n@param line_num The line double-clicked.\n@see error_detail\n run _m.textadept.run.run()\nRuns/executes the file as specified by its extension in the run_command table.\n@see run_command\n +compile_command _m.textadept.run.compile_command [table]\nFile extensions and their associated 'compile' actions. Each key is a file\nextension whose value is a either a command line string to execute or a\nfunction returning one. This table is typically populated by language-specific\nmodules.\n +error_detail _m.textadept.run.error_detail [table]\nA table of error string details. Each entry is a table with the\nfollowing fields: pattern: the Lua pattern that matches a specific error\nstring. filename: the index of the Lua capture that contains the filename the\nerror occured in. line: the index of the Lua capture that contains the line\nnumber the error occured on. message: [Optional] the index of the Lua capture\nthat contains the error's message. A call tip will be displayed if a message\nwas captured. When an error message is double-clicked, the user is taken to the\npoint of error. This table is usually populated by language-specific modules.\n +run_command _m.textadept.run.run_command [table]\nFile extensions and their associated 'go' actions. Each key is a file extension\nwhose value is either a command line string to execute or a function returning\none. This table is typically populated by language-specific modules.\n +session _m.textadept.session [module]\nSession support for the textadept module.\n load _m.textadept.session.load(filename)\nLoads a Textadept session file. Textadept restores split views, opened buffers,\ncursor information, and project manager details.\n@param filename The absolute path to the session file to load. Defaults to\nDEFAULT_SESSION if not specified.\n@usage _m.textadept.session.load(filename)\n@return true if the session file was opened and read; false otherwise.\n save _m.textadept.session.save(filename)\nSaves a Textadept session to a file. Saves split views, opened buffers,\ncursor information, and project manager details.\n@param filename The absolute path to the session file to save. Defaults to\neither the current session file or DEFAULT_SESSION if not specified.\n@usage _m.textadept.session.save(filename)\n DEFAULT_SESSION _m.textadept.session.DEFAULT_SESSION [string]\nThe path to the default session file.\n SAVE_ON_QUIT _m.textadept.session.SAVE_ON_QUIT [bool]\nSave the session when quitting. The default value is `true` and can be\ndisabled by passing the command line switch '-n' or '--nosession' to Textadept.\n +snapopen _m.textadept.snapopen [module]\nSnapopen for the textadept module.\n open _m.textadept.snapopen.open(utf8_paths, filter, exclusive, depth)\nQuickly open a file in set of directories.\n@param utf8_paths A UTF-8 string directory path or table of UTF-8 directory\npaths to search.\n@param filter A filter for files and folders to exclude. The filter may be\na string or table. Each filter is a Lua pattern. Any files matching a filter\nare excluded. Prefix a pattern with '!' to exclude any files that do not match\nthe filter. Directories can be excluded by adding filters to a table assigned\nto a 'folders' key in the filter table. All strings should be UTF-8 encoded.\n@param exclusive Flag indicating whether or not to exclude PATHS in the\nsearch. Defaults to false.\n@param depth Number of directories to recurse into for finding files. Defaults\nto DEFAULT_DEPTH.\n@usage _m.textadept.snapopen.open()\n@usage _m.textadept.snapopen.open(buffer.filename:match('^.+/'), nil, true)\n@usage _m.textadept.snapopen.open(nil, '!%.lua$')\n@usage _m.textadept.snapopen.open(nil, { folders = { '%.hg' } })\n PATHS _m.textadept.snapopen.PATHS [table]\nTable of default UTF-8 paths to search.\n DEFAULT_DEPTH _m.textadept.snapopen.DEFAULT_DEPTH [number]\nMaximum directory depth to search. The default value is 4.\n MAX _m.textadept.snapopen.MAX [number]\nMaximum number of files to list. The default value is 1000.\n +snippets _m.textadept.snippets [module]\nProvides Lua-style snippets for Textadept.\n _cancel_current _m.textadept.snippets._cancel_current()\nCancels the active snippet, reverting to the state before its activation,\nand restores the previously running snippet (if any).\n _insert _m.textadept.snippets._insert(text)\nInserts a snippet.\n@param text Optional snippet text. If none is specified, the snippet text\nis determined from the trigger and lexer.\n@return false if no snippet was expanded; true otherwise.\n _previous _m.textadept.snippets._previous()\nGoes back to the previous placeholder, reverting any changes from the\ncurrent one.\n@return false if no snippet is active; nil otherwise.\n _select _m.textadept.snippets._select()\nPrompts the user to select a snippet to insert from a filtered list\ndialog. Global snippets and snippets in the current lexer are shown.\n +snippets _G.snippets [table]\nProvides access to snippets from _G.\n +args _G.args [module]\nProcesses command line arguments for Textadept.\n process args.process()\nProcesses command line arguments. Add command line switches with\nargs.register(). Any unrecognized arguments are treated as filepaths and\nopened. Generates an 'arg_none' event when no args are present.\n@see register\n register args.register(switch1, switch2, narg, f, description)\nRegisters a command line switch.\n@param switch1 String switch (short version).\n@param switch2 String switch (long version).\n@param narg The number of expected parameters for the switch.\n@param f The Lua function to run when the switch is tripped.\n@param description Description of the switch.\n +buffer _G.buffer [module]\nThe current buffer in the currently focused view. It also represents the\nstructure of any buffer table in 'buffers'.\n add_selection buffer.add_selection(buffer, caret, anchor)\nAdd a selection from anchor to caret as the main selection. Retainings all\nother selections as additional selections. Since there is always at least one\nselection, to set a list of selections, the first selection should be added\nwith `buffer:set_selection()` and later selections added with this function.\n@param buffer The focused buffer.\n@param caret The caret.\n@param anchor The anchor.\n add_text buffer.add_text(buffer, text)\nAdd text to the document at current position. The current position is set\nat the end of the inserted text, but it is not scrolled into view.\n@param buffer The focused buffer.\n@param text The text to add.\n allocate buffer.allocate(buffer, bytes)\nEnlarge the document to a particular size of text bytes. The document will\nnot be made smaller than its current contents.\n@param buffer The focused buffer.\n @@ -1188,10 +1259,13 @@ wrap_visual_flags buffer.wrap_visual_flags [number]\nThe display mode of visual wrap_visual_flags_location buffer.wrap_visual_flags_location [number]\nThe location of visual flags for wrapped lines.\n * `_SCINTILLA.constants.SC_WRAPVISUALFLAGLOC_DEFAULT` (0): Visual flags\n drawn near border.\n * `_SCINTILLA.constants.SC_WRAPVISUALFLAGLOC_END_BY_TEXT` (1): Visual\n flag at end of subline drawn near text.\n * `_SCINTILLA.constants.SC_WRAPVISUALFLAGLOC_START_BY_TEXT` (2): Visual\n flag at beginning of subline drawn near text.\n\n x_offset buffer.x_offset [number]\nThe horizontal scroll position. A value of 0 is the normal position with\nthe first text column visible at the left of the view.\n zoom buffer.zoom [number]\nThe number of points added to the size of all fonts. It may be positive to\nmagnify or negative to reduce.\n +events _G.events [module]\nTextadept's core event structure and handlers.\n connect events.connect(event, f, index)\nAdds a handler function to an event.\n@param event The string event name. It is arbitrary and need not be defined\nanywhere.\n@param f The Lua function to add.\n@param index Optional index to insert the handler into.\n@return Index of handler.\n@see disconnect\n disconnect events.disconnect(event, index)\nDisconnects a handler function from an event.\n@param event The string event name.\n@param index Index of the handler (returned by events.connect).\n@see connect\n emit events.emit(event, ...)\nCalls all handlers for the given event in sequence (effectively "generating"\nthe event). If true or false is explicitly returned by any handler, the\nevent is not propagated any further; iteration ceases.\n@param event The string event name.\n@param ... Arguments passed to the handler.\n@return true or false if any handler explicitly returned such; nil otherwise.\n notification events.notification(n)\nHandles Scintilla notifications.\n@param n The Scintilla notification structure as a Lua table.\n@return true or false if any handler explicitly returned such; nil otherwise.\n +handlers events.handlers [table]\nA table of event names and a table of functions connected to them.\n +gui _G.gui [module]\nThe core gui table.\n _print gui._print(buffer_type, ...)\nHelper function for printing messages to buffers. Splits the view and opens a\nnew buffer for printing messages. If the message buffer is already open and a\nview is currently showing it, the message is printed to that view. Otherwise\nthe view is split, goes to the open message buffer, and prints to it.\n@param buffer_type String type of message buffer.\n@param ... Message strings.\n@usage gui._print(L('[Error Buffer]'), error_message)\n@usage gui._print(L('[Message Buffer]'), message)\n check_focused_buffer gui.check_focused_buffer(buffer)\nChecks if the buffer being indexed is the currently focused buffer. This is\nnecessary because any buffer actions are performed in the focused views'\nbuffer, which may not be the buffer being indexed. Throws an error if the\ncheck fails.\n@param buffer The buffer in question.\n dialog gui.dialog(kind, ...)\nDisplays a CocoaDialog of a specified type with the given string\narguments. Each argument is like a string in Lua's 'arg' table. Tables of\nstrings are allowed as arguments and are expanded in place. This is useful\nfor filteredlist dialogs with many items.\n@return string CocoaDialog result.\n @@ -1209,8 +1283,10 @@ clipboard_text gui.clipboard_text [string]\nThe text on the clipboard. (Read-onl statusbar_text gui.statusbar_text [string]\nThe text displayed by the statusbar.\n docstatusbar_text gui.docstatusbar_text [string]\nThe text displayed by the doc statusbar. (Write-only)\n size gui.size [table]\nThe size of the Textadept window (`{ width, height }`).\n +command_entry gui.command_entry [module]\nTextadept's Command entry.\n focus gui.command_entry.focus()\nFocuses the command entry.\n entry_text gui.command_entry.entry_text [string]\nThe text in the entry.\n +find gui.find [module]\nTextadept's integrated find/replace dialog.\n find_in_files gui.find.find_in_files(utf8_dir)\nPerforms a find in files with the given directory. Use the gui.find fields\nto set the text to find and find options.\n@param utf8_dir UTF-8 encoded directory name. If none is provided, the user\nis prompted for one.\n find_incremental gui.find.find_incremental()\nBegins an incremental find using the Lua command entry. Lua command\nfunctionality will be unavailable until the search is finished (pressing\n'Escape' by default).\n find_next gui.find.find_next()\nMimicks a press of the 'Find Next' button in the Find box.\n @@ -1225,6 +1301,7 @@ match_case gui.find.match_case [bool]\nSearches are case-sensitive.\n whole_word gui.find.whole_word [bool]\nOnly whole-word matches are allowed in searches.\n lua gui.find.lua [bool]\nThe search text is interpreted as a Lua pattern.\n in_files gui.find.in_files [bool]\nSearch for the text in a list of files.\n +io _G.io [module]\nLua io module.\n close_all io.close_all()\nCloses all open buffers. If any buffer is dirty, the user is prompted to\ncontinue. No buffers are saved automatically. They must be saved manually.\n@usage io.close_all()\n@return true if user did not cancel.\n open_file io.open_file(utf8_filenames)\nOpens a list of files.\n@param utf8_filenames A '\\n' separated list of UTF-8-encoded filenames to\nopen. If nil, the user is prompted with a fileselect dialog.\n@usage io.open_file(utf8_encoded_filename)\n save_all io.save_all()\nSaves all dirty buffers to their respective files.\n@usage io.save_all()\n @@ -1239,13 +1316,19 @@ read io.read(···)\nEquivalent to `io.input():read`.\n tmpfile io.tmpfile()\nReturns a handle for a temporary file. This file is opened in update mode\nand it is automatically removed when the program ends.\n type io.type(obj)\nChecks whether `obj` is a valid file handle. Returns the string `"file"`\nif `obj` is an open file handle, `"closed file"` if `obj` is a closed file\nhandle, or nil if `obj` is not a file handle.\n write io.write(···)\nEquivalent to `io.output():write`.\n +boms io.boms [table]\nList of byte-order marks (BOMs).\n +recent_files io.recent_files [table]\nList of recently opened files.\n +try_encodings io.try_encodings [table]\nList of encodings to try to decode files as after UTF-8.\n stderr io.stderr\nStandard error.\n stdin io.stdin\nStandard in.\n stdout io.stdout\nStandard out.\n +keys _G.keys [module]\nManages key commands in Textadept.\n +KEYSYMS keys.KEYSYMS [table]\nLookup table for key values higher than 255. If a key value given to 'keypress'\nis higher than 255, this table is used to return a string representation of\nthe key if it exists.\n CTRL keys.CTRL [string]\nThe string representing the Control key.\n SHIFT keys.SHIFT [string]\nThe string representing the Shift key.\n ALT keys.ALT [string]\nThe string representing the Alt key (the Apple key on Mac OSX).\n ADD keys.ADD [string]\nThe string representing used to join together a sequence of Control, Shift,\nor Alt modifier keys.\n +lexer _G.lexer [module]\nPerforms lexing of Scintilla documents.\n color lexer.color(r, g, b)\nCreates a Scintilla color.\n@param r The string red component of the hexadecimal color.\n@param g The string green component of the color.\n@param b The string blue component of the color.\n@usage local red = color('FF', '00', '00')\n delimited_range lexer.delimited_range(chars, escape, end_optional, balanced, forbidden)\nCreates an LPeg pattern that matches a range of characters delimitted by a\nspecific character(s). This can be used to match a string, parenthesis, etc.\n@param chars The character(s) that bound the matched range.\n@param escape Optional escape character. This parameter may be omitted, nil,\nor the empty string.\n@param end_optional Optional flag indicating whether or not an ending delimiter\nis optional or not. If true, the range begun by the start delimiter matches\nuntil an end delimiter or the end of the input is reached.\n@param balanced Optional flag indicating whether or not a balanced range is\nmatched, like `%b` in Lua's `string.find`. This flag only applies if `chars`\nconsists of two different characters (e.g. '()').\n@param forbidden Optional string of characters forbidden in a delimited\nrange. Each character is part of the set.\n@usage local sq_str_noescapes = delimited_range("'")\n@usage local sq_str_escapes = delimited_range("'", '\\', true)\n@usage local unbalanced_parens = delimited_range('()', '\\', true)\n@usage local balanced_parens = delimited_range('()', '\\', true, true)\n embed_lexer lexer.embed_lexer(parent, child, start_rule, end_rule)\nEmbeds a child lexer language in a parent one.\n@param parent The parent lexer.\n@param child The child lexer.\n@param start_rule The token that signals the beginning of the embedded lexer.\n@param end_rule The token that signals the end of the embedded lexer.\n@usage embed_lexer(_M, css, css_start_rule, css_end_rule)\n@usage embed_lexer(html, _M, php_start_rule, php_end_rule)\n@usage embed_lexer(html, ruby, ruby_start_rule, rule_end_rule)\n @@ -1261,6 +1344,8 @@ starts_line lexer.starts_line(patt)\nCreates an LPeg pattern from a given patter style lexer.style(style_table)\nCreates a Scintilla style from a table of style properties.\n@param style_table A table of style properties. Style properties available:\nfont = [string] size = [integer] bold = [boolean]\nitalic = [boolean] underline = [boolean] fore = [integer]*\nback = [integer]* eolfilled = [boolean] characterset = ? case\n= [integer] visible = [boolean] changeable = [boolean] hotspot =\n[boolean] * Use the value returned by `color()`.\n@usage local bold_italic = style { bold = true, italic = true }\n@see color\n token lexer.token(name, patt)\nCreates an LPeg capture table index with the name and position of the token.\n@param name The name of token. If this name is not in `l.tokens` then you\nwill have to specify a style for it in `lexer._tokenstyles`.\n@param patt The LPeg pattern associated with the token.\n@usage local ws = token(l.WHITESPACE, l.space^1)\n@usage php_start_rule = token('php_tag', '