diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/lua/api | 96 | ||||
-rw-r--r-- | modules/lua/tags | 57 |
2 files changed, 134 insertions, 19 deletions
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', '<?' * ('php' * l.space)^-1)\n word_match lexer.word_match(words, word_chars, case_insensitive)\nCreates an LPeg pattern that matches a set of words.\n@param words A table of words.\n@param word_chars Optional string of additional characters considered to be\npart of a word (default is `%w_`).\n@param case_insensitive Optional boolean flag indicating whether the word\nmatch is case-insensitive.\n@usage local keyword = token(l.KEYWORD, word_match { 'foo', 'bar', 'baz' })\n@usage local keyword = token(l.KEYWORD, word_match({ 'foo-bar', 'foo-baz',\n'bar-foo', 'bar-baz', 'baz-foo', 'baz-bar' }, '-', true))\n +_EMBEDDEDRULES lexer._EMBEDDEDRULES [table]\nSet of rules for an embedded lexer. For a parent lexer name, contains child's\n`start_rule`, `token_rule`, and `end_rule` patterns.\n +_RULES lexer._RULES [table]\nList of rule names with associated LPeg patterns for a specific lexer. It\nis accessible to other lexers for embedded lexer applications.\n DEFAULT lexer.DEFAULT\n\n WHITESPACE lexer.WHITESPACE\n\n COMMENT lexer.COMMENT\n\n @@ -1331,7 +1416,9 @@ SC_FOLDLEVELBASE lexer.SC_FOLDLEVELBASE\nThe initial (root) fold level.\n SC_FOLDLEVELWHITEFLAG lexer.SC_FOLDLEVELWHITEFLAG\nFlag indicating that the line is blank.\n SC_FOLDLEVELHEADERFLAG lexer.SC_FOLDLEVELHEADERFLAG\nFlag indicating the line is fold point.\n SC_FOLDLEVELNUMBERMASK lexer.SC_FOLDLEVELNUMBERMASK\nFlag used with `SCI_GETFOLDLEVEL(line)` to get the fold level of a line.\n +locale _G.locale [module]\nContains all messages used by Textadept for localization.\n localize locale.localize(id)\nLocalizes the given string.\n@param id String to localize.\n +string _G.string [module]\nLua string module.\n iconv string.iconv(text, to, from)\nConverts a string from one character set to another using iconv(). Valid\ncharacter sets are ones GLib's g_convert() accepts, typically GNU iconv's\ncharacter sets.\n@param text The text to convert.\n@param to The character set to convert to.\n@param from The character set to convert from.\n byte string.byte(s [, i [, j]])\nReturns the internal numerical codes of the characters `s[i]`, `s[i+1]`,\n···, `s[j]`. The default value for `i` is 1; the default value for `j` is\n`i`. Note that numerical codes are not necessarily portable across platforms.\n char string.char(···)\nReceives zero or more integers. Returns a string with length equal to the\nnumber of arguments, in which each character has the internal numerical\ncode equal to its corresponding argument. Note that numerical codes are not\nnecessarily portable across platforms.\n @@ -1347,18 +1434,21 @@ rep string.rep(s, n)\nReturns a string that is the concatenation of `n` copies o reverse string.reverse(s)\nReturns a string that is the string `s` reversed.\n sub string.sub(s, i [, j])\nReturns the substring of `s` that starts at `i` and continues until `j`;\n`i` and `j` can be negative. If `j` is absent, then it is assumed to\nbe equal to -1 (which is the same as the string length). In particular,\nthe call `string.sub(s,1,j)` returns a prefix of `s` with length `j`, and\n`string.sub(s, -i)` returns a suffix of `s` with length `i`.\n upper string.upper(s)\nReceives a string and returns a copy of this string with all lowercase\nletters changed to uppercase. All other characters are left unchanged. The\ndefinition of what a lowercase letter is depends on the current locale.\n +view _G.view [module]\nThe currently focused view. It also represents the structure of any view\ntable in 'views'.\n focus view:focus()\nFocuses the indexed view if it hasn't been already.\n goto_buffer view:goto_buffer(n, absolute)\nGoes to the specified buffer in the indexed view. Activates the\n'buffer_*_switch' signals.\n@param n A relative or absolute buffer index.\n@param absolute Flag indicating if n is an absolute index or not.\n split view:split(vertical)\nSplits the indexed view vertically or horizontally and focuses the new view.\n@param vertical Flag indicating a vertical split. False for horizontal.\n@return old view and new view tables.\n unsplit view:unsplit()\nUnsplits the indexed view if possible.\n@return boolean if the view was unsplit or not.\n doc_pointer view.doc_pointer [number]\nThe pointer to the document associated with this view's buffer. (Read-only)\n size view.size [number]\nThe position of the split resizer (if this view is part of a split view).\n +coroutine _G.coroutine [module]\nLua coroutine module.\n create coroutine.create(f)\nCreates a new coroutine, with body `f`. `f` must be a Lua function. Returns\nthis new coroutine, an object with type `"thread"`.\n resume coroutine.resume(co [, val1, ···])\nStarts or continues the execution of coroutine `co`. The first time you resume\na coroutine, it starts running its body. The values `val1`, ··· are passed\nas the arguments to the body function. If the coroutine has yielded, `resume`\nrestarts it; the values `val1`, ··· are passed as the results from the\nyield. If the coroutine runs without any errors, `resume` returns true plus\nany values passed to `yield` (if the coroutine yields) or any values returned\nby the body function (if the coroutine terminates). If there is any error,\n`resume` returns false plus the error message.\n running coroutine.running()\nReturns the running coroutine, or nil when called by the main thread.\n status coroutine.status(co)\nReturns the status of coroutine `co`, as a string: `"running"`, if the\ncoroutine is running (that is, it called `status`); `"suspended"`, if the\ncoroutine is suspended in a call to `yield`, or if it has not started running\nyet; `"normal"` if the coroutine is active but not running (that is, it has\nresumed another coroutine); and `"dead"` if the coroutine has finished its\nbody function, or if it has stopped with an error.\n wrap coroutine.wrap(f)\nCreates a new coroutine, with body `f`. `f` must be a Lua function. Returns\na function that resumes the coroutine each time it is called. Any arguments\npassed to the function behave as the extra arguments to `resume`. Returns\nthe same values returned by `resume`, except the first boolean. In case of\nerror, propagates the error.\n yield coroutine.yield(···)\nSuspends the execution of the calling coroutine. The coroutine cannot be\nrunning a C function, a metamethod, or an iterator. Any arguments to `yield`\nare passed as extra results to `resume`.\n +debug _G.debug [module]\nLua debug module.\n debug debug.debug()\nEnters an interactive mode with the user, running each string that the user\nenters. Using simple commands and other debug facilities, the user can inspect\nglobal and local variables, change their values, evaluate expressions, and so\non. A line containing only the word `cont` finishes this function, so that\nthe caller continues its execution. Note that commands for `debug.debug`\nare not lexically nested within any function, and so have no direct access\nto local variables.\n getfenv debug.getfenv(o)\nReturns the environment of object `o`.\n gethook debug.gethook([thread])\nReturns the current hook settings of the thread, as three values: the current\nhook function, the current hook mask, and the current hook count (as set by\nthe `debug.sethook` function).\n @@ -1372,6 +1462,7 @@ sethook debug.sethook([thread, ] hook, mask [, count])\nSets the given function setlocal debug.setlocal([thread, ] level, local, value)\nThis function assigns the value `value` to the local variable with index\n`local` of the function at level `level` of the stack. The function returns nil\nif there is no local variable with the given index, and raises an error when\ncalled with a `level` out of range. (You can call `getinfo` to check whether\nthe level is valid.) Otherwise, it returns the name of the local variable.\n setmetatable debug.setmetatable(object, table)\nSets the metatable for the given `object` to the given `table` (which can\nbe nil).\n setupvalue debug.setupvalue(func, up, value)\nThis function assigns the value `value` to the upvalue with index `up` of\nthe function `func`. The function returns nil if there is no upvalue with\nthe given index. Otherwise, it returns the name of the upvalue.\n +lfs _G.lfs [module]\nLua lfs module.\n attributes lfs.attributes(filepath [, aname])\nReturns a table with the file attributes corresponding to filepath (or\nnil followed by an error message in case of error). If the second optional\nargument is given, then only the value of the named attribute is returned\n(this use is equivalent to lfs.attributes(filepath).aname, but the table is not\ncreated and only one attribute is retrieved from the O.S.). The attributes are\ndescribed as follows; attribute mode is a string, all the others are numbers,\nand the time related attributes use the same time reference of os.time: dev:\non Unix systems, this represents the device that the inode resides on. On\nWindows systems, represents the drive number of the disk containing the file\nino: on Unix systems, this represents the inode number. On Windows systems\nthis has no meaning mode: string representing the associated protection mode\n(the values could be file, directory, link, socket, named pipe, char device,\nblock device or other) nlink: number of hard links to the file uid: user-id\nof owner (Unix only, always 0 on Windows) gid: group-id of owner (Unix only,\nalways 0 on Windows) rdev: on Unix systems, represents the device type, for\nspecial file inodes. On Windows systems represents the same as dev access:\ntime of last access modification: time of last data modification change:\ntime of last file status change size: file size, in bytes blocks: block\nallocated for file; (Unix only) blksize: optimal file system I/O blocksize;\n(Unix only) This function uses stat internally thus if the given filepath is\na symbolic link, it is followed (if it points to another link the chain is\nfollowed recursively) and the information is about the file it refers to. To\nobtain information about the link itself, see function lfs.symlinkattributes.\n chdir lfs.chdir(path)\nChanges the current working directory to the given path. Returns true in\ncase of success or nil plus an error string.\n currentdir lfs.currentdir()\nReturns a string with the current working directory or nil plus an error\nstring.\n @@ -1384,6 +1475,7 @@ setmode lfs.setmode(file, mode)\nSets the writing mode for a file. The mode stri symlinkattributes lfs.symlinkattributes(filepath [, aname])\nIdentical to lfs.attributes except that it obtains information about the link\nitself (not the file it refers to). This function is not available in Windows\nso you may want to make sure that lfs.symlinkattributes exists before using it.\n touch lfs.touch(filepath [, atime [, mtime]])\nSet access and modification times of a file. This function is a bind to utime\nfunction. The first argument is the filename, the second argument (atime)\nis the access time, and the third argument (mtime) is the modification\ntime. Both times are provided in seconds (which should be generated with\nLua standard function os.time). If the modification time is omitted, the\naccess time provided is used; if both times are omitted, the current time\nis used. Returns true if the operation was successful; in case of error,\nit returns nil plus an error string.\n unlock lfs.unlock(filehandle[, start[, length]])\nUnlocks a file or a part of it. This function works on open files; the file\nhandle should be specified as the first argument. The optional arguments\nstart and length can be used to specify a starting point and its length;\nboth should be numbers. Returns true if the operation was successful; in\ncase of error, it returns nil plus an error string.\n +lpeg _G.lpeg [module]\nLua lpeg module.\n 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.\n Carg lpeg.Carg(n)\nCreates an argument capture. This pattern matches the empty string and produces\nthe value given as the nth extra argument given in the call to lpeg.match.\n Cb lpeg.Cb(name)\nCreates a back capture. This pattern matches the empty string and produces the\nvalues produced by the most recent group capture named name. Most recent means\nthe last complete outermost group capture with the given name. A Complete\ncapture means that the entire pattern corresponding to the capture has\nmatched. An Outermost capture means that the capture is not inside another\ncomplete capture.\n @@ -1403,6 +1495,7 @@ match lpeg.match(pattern, subject [, init])\nThe matching function. It attempts setmaxstack lpeg.setmaxstack(max)\nSets the maximum size for the backtrack stack used by LPeg to track calls\nand choices. 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.\n type lpeg.type(value)\nIf the given value is a pattern, returns the string "pattern". Otherwise\nreturns nil.\n version lpeg.version()\nReturns a string with the running version of LPeg.\n +math _G.math [module]\nLua math module.\n abs math.abs(x)\nReturns the absolute value of `x`.\n acos math.acos(x)\nReturns the arc cosine of `x` (in radians).\n asin math.asin(x)\nReturns the arc sine of `x` (in radians).\n @@ -1433,6 +1526,7 @@ tan math.tan(x)\nReturns the tangent of `x` (assumed to be in radians).\n tanh math.tanh(x)\nReturns the hyperbolic tangent of `x`.\n HUGE_VAL math.HUGE_VAL\nThe value `HUGE_VAL`, a value larger than or equal to any other numerical\nvalue.\n pi math.pi\nThe value of *pi*.\n +os _G.os [module]\nLua os module.\n clock os.clock()\nReturns an approximation of the amount in seconds of CPU time used by the\nprogram.\n date os.date([format [, time]])\nReturns a string or a table containing date and time, formatted according to\nthe given string `format`. If the `time` argument is present, this is the\ntime to be formatted (see the `os.time` function for a description of this\nvalue). Otherwise, `date` formats the current time. If `format` starts with\n'`!`', then the date is formatted in Coordinated Universal Time. After\nthis optional character, if `format` is the string "`*t`", then `date`\nreturns a table with the following fields: `year` (four digits), `month`\n(1--12), `day` (1--31), `hour` (0--23), `min` (0--59), `sec` (0--61), `wday`\n(weekday, Sunday is 1), `yday` (day of the year), and `isdst` (daylight\nsaving flag, a boolean). If `format` is not "`*t`", then `date` returns the\ndate as a string, formatted according to the same rules as the C function\n`strftime`. When called without arguments, `date` returns a reasonable date\nand time representation that depends on the host system and on the current\nlocale (that is, `os.date()` is equivalent to `os.date("%c")`).\n difftime os.difftime(t2, t1)\nReturns the number of seconds from time `t1` to time `t2`. In POSIX, Windows,\nand some other systems, this value is exactly `t2`*-*`t1`.\n @@ -1444,6 +1538,7 @@ rename os.rename(oldname, newname)\nRenames file or directory named `oldname` to setlocale os.setlocale(locale [, category])\nSets the current locale of the program. `locale` is a string specifying a\nlocale; `category` is an optional string describing which category to change:\n`"all"`, `"collate"`, `"ctype"`, `"monetary"`, `"numeric"`, or `"time"`; the\ndefault category is `"all"`. The function returns the name of the new locale,\nor nil if the request cannot be honored. If `locale` is the empty string,\nthe current locale is set to an implementation-defined native locale. If\n`locale` is the string "`C`", the current locale is set to the standard\nC locale. When called with nil as the first argument, this function only\nreturns the name of the current locale for the given category.\n time os.time([table])\nReturns the current time when called without arguments, or a time representing\nthe date and time specified by the given table. This table must have fields\n`year`, `month`, and `day`, and may have fields `hour`, `min`, `sec`, and\n`isdst` (for a description of these fields, see the `os.date` function). The\nreturned value is a number, whose meaning depends on your system. In POSIX,\nWindows, and some other systems, this number counts the number of seconds\nsince some given start time (the "epoch"). In other systems, the meaning\nis not specified, and the number returned by `time` can be used only as an\nargument to `date` and `difftime`.\n tmpname os.tmpname()\nReturns a string with a file name that can be used for a temporary file. The\nfile must be explicitly opened before its use and explicitly removed when\nno longer needed. On some systems (POSIX), this function also creates a file\nwith that name, to avoid security risks. (Someone else might create the file\nwith wrong permissions in the time between getting the name and creating\nthe file.) You still have to open the file to use it and to remove it (even\nif you do not use it). When possible, you may prefer to use `io.tmpfile`,\nwhich automatically removes the file when the program ends.\n +package _G.package [module]\nLua package module.\n loadlib package.loadlib(libname, funcname)\nDynamically links the host program with the C library `libname`. Inside this\nlibrary, looks for a function `funcname` and returns this function as a C\nfunction. (So, `funcname` must follow the protocol (see `lua_CFunction`)). This\nis 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 extension. `funcname`\nmust be the exact name exported by the C library (which may depend on the C\ncompiler and linker used). This function is not supported by ANSI C. As such,\nit is only available on some platforms (Windows, Linux, Mac OS X, Solaris,\nBSD, plus other Unix systems that support the `dlfcn` standard).\n seeall package.seeall(module)\nSets a metatable for `module` with its `__index` field referring to the\nglobal environment, so that this module inherits values from the global\nenvironment. To be used as an option to function `module`.\n cpath package.cpath\nThe path used by `require` to search for a C loader. Lua initializes the C path\n`package.cpath` in the same way it initializes the Lua path `package.path`,\nusing the environment variable `LUA_CPATH` or a default path defined in\n`luaconf.h`.\n @@ -1451,6 +1546,7 @@ loaded package.loaded\nA table used by `require` to control which modules are al loaders package.loaders\nA table used by `require` to control how to load modules. Each entry in\nthis table is a *searcher function*. When looking for a module, `require`\ncalls each of these searchers in ascending order, with the module name\n(the argument given to `require`) as its sole parameter. The function can\nreturn another function (the module *loader*) or a string explaining why it\ndid not find that module (or nil if it has nothing to say). Lua initializes\nthis table with four functions. The first searcher simply looks for a loader\nin the `package.preload` table. The second searcher looks for a loader as a\nLua library, using the path stored at `package.path`. A path is a sequence\nof *templates* separated by semicolons. For each template, the searcher will\nchange each interrogation mark in the template by `filename`, which is the\nmodule name with each dot replaced by a "directory separator" (such as "`/`"\nin Unix); then it will try to open the resulting file name. So, for instance,\nif the Lua path is the string\n "./?.lua;./?.lc;/usr/local/?/init.lua"\nthe search for a Lua file for module `foo` will try to open the files\n`./foo.lua`, `./foo.lc`, and `/usr/local/foo/init.lua`, in that order. The\nthird searcher looks for a loader as a C library, using the path given by\nthe variable `package.cpath`. For instance, if the C path is the string\n "./?.so;./?.dll;/usr/local/?/init.so"\nthe searcher for module `foo` will try to open the files `./foo.so`,\n`./foo.dll`, and `/usr/local/foo/init.so`, in that order. Once it finds\na C library, this searcher first uses a dynamic link facility to link the\napplication with the library. Then it tries to find a C function inside the\nlibrary to be used as the loader. The name of this C function is the string\n"`luaopen_`" concatenated with a copy of the module name where each dot is\nreplaced by an underscore. Moreover, if the module name has a hyphen, its\nprefix up to (and including) the first hyphen is removed. For instance, if the\nmodule name is `a.v1-b.c`, the function name will be `luaopen_b_c`. The fourth\nsearcher tries an *all-in-one loader*. It searches the C path for a library\nfor the root name of the given module. For instance, when requiring `a.b.c`,\nit will search for a C library for `a`. If found, it looks into it for an open\nfunction for the submodule; in our example, that would be `luaopen_a_b_c`. With\nthis facility, a package can pack several C submodules into one single library,\nwith each submodule keeping its original open function.\n path package.path\nThe path used by `require` to search for a Lua loader. At start-up,\nLua initializes this variable with the value of the environment variable\n`LUA_PATH` or with a default path defined in `luaconf.h`, if the environment\nvariable is not defined. Any "`;;`" in the value of the environment variable\nis replaced by the default path.\n preload package.preload\nA table to store loaders for specific modules (see `require`).\n +table _G.table [module]\nLua table module.\n concat table.concat(table [, sep [, i [, j]]])\nGiven an array where all elements are strings or numbers, returns\n`table[i]..sep..table[i+1] ··· sep..table[j]`. The default value for `sep`\nis the empty string, the default for `i` is 1, and the default for `j` is\nthe length of the table. If `i` is greater than `j`, returns the empty string.\n insert table.insert(table, [pos, ] value)\nInserts element `value` at position `pos` in `table`, shifting up other\nelements to open space, if necessary. The default value for `pos` is\n`n+1`, where `n` is the length of the table (see §2.5.5), so that a call\n`table.insert(t,x)` inserts `x` at the end of table `t`.\n maxn table.maxn(table)\nReturns the largest positive numerical index of the given table, or zero if\nthe table has no positive numerical indices. (To do its job this function\ndoes a linear traversal of the whole table.)\n diff --git a/modules/lua/tags b/modules/lua/tags index 66fb8d29..d787ea82 100644 --- a/modules/lua/tags +++ b/modules/lua/tags @@ -716,54 +716,70 @@ _m _ 0;" t _m.cpp _ 0;" m cpp _ 0;" t class:_m set_buffer_properties _ 0;" f class:_m.cpp -_G.keys.cpp _ 0;" t class:_m.cpp -_G.snippets.cpp _ 0;" t class:_m.cpp +cpp _ 0;" t class:_G.keys +cpp _ 0;" t class:keys +cpp _ 0;" t class:_G.snippets +cpp _ 0;" t class:snippets sense _ 0;" F class:_m.cpp _m.css _ 0;" m css _ 0;" t class:_m set_buffer_properties _ 0;" f class:_m.css -_G.keys.css _ 0;" t class:_m.css -_G.snippets.css _ 0;" t class:_m.css +css _ 0;" t class:_G.keys +css _ 0;" t class:keys +css _ 0;" t class:_G.snippets +css _ 0;" t class:snippets sense _ 0;" F class:_m.css _m.hypertext _ 0;" m hypertext _ 0;" t class:_m set_buffer_properties _ 0;" f class:_m.hypertext -_G.keys.hypertext _ 0;" t class:_m.hypertext -_G.snippets.hypertext _ 0;" t class:_m.hypertext +hypertext _ 0;" t class:_G.keys +hypertext _ 0;" t class:keys +hypertext _ 0;" t class:_G.snippets +hypertext _ 0;" t class:snippets sense _ 0;" F class:_m.hypertext _m.java _ 0;" m java _ 0;" t class:_m set_buffer_properties _ 0;" f class:_m.java -_G.keys.java _ 0;" t class:_m.java -_G.snippets.java _ 0;" t class:_m.java +java _ 0;" t class:_G.keys +java _ 0;" t class:keys +java _ 0;" t class:_G.snippets +java _ 0;" t class:snippets sense _ 0;" F class:_m.java _m.lua _ 0;" m lua _ 0;" t class:_m goto_required _ 0;" f class:_m.lua set_buffer_properties _ 0;" f class:_m.lua try_to_autocomplete_end _ 0;" f class:_m.lua -_G.keys.lua _ 0;" t class:_m.lua -_G.snippets.lua _ 0;" t class:_m.lua +lua _ 0;" t class:_G.keys +lua _ 0;" t class:keys +lua _ 0;" t class:_G.snippets +lua _ 0;" t class:snippets control_structure_patterns _ 0;" t class:_m.lua sense _ 0;" F class:_m.lua _m.php _ 0;" m php _ 0;" t class:_m goto_required _ 0;" f class:_m.php set_buffer_properties _ 0;" f class:_m.php -_G.keys.php _ 0;" t class:_m.php -_G.snippets.php _ 0;" t class:_m.php +php _ 0;" t class:_G.keys +php _ 0;" t class:keys +php _ 0;" t class:_G.snippets +php _ 0;" t class:snippets sense _ 0;" F class:_m.php _m.rails _ 0;" m rails _ 0;" t class:_m load_project _ 0;" f class:_m.rails -_G.keys.rails _ 0;" t class:_m.rails -_G.snippets.rails _ 0;" t class:_m.rails +rails _ 0;" t class:_G.keys +rails _ 0;" t class:keys +rails _ 0;" t class:_G.snippets +rails _ 0;" t class:snippets sense _ 0;" F class:_m.rails singular _ 0;" F class:_m.rails _m.rhtml _ 0;" m rhtml _ 0;" t class:_m -_G.keys.rhtml _ 0;" t class:_m.rhtml -_G.snippets.rhtml _ 0;" t class:_m.rhtml +rhtml _ 0;" t class:_G.keys +rhtml _ 0;" t class:keys +rhtml _ 0;" t class:_G.snippets +rhtml _ 0;" t class:snippets sense _ 0;" F class:_m.rhtml _m.ruby _ 0;" m ruby _ 0;" t class:_m @@ -771,8 +787,10 @@ goto_required _ 0;" f class:_m.ruby set_buffer_properties _ 0;" f class:_m.ruby toggle_block _ 0;" f class:_m.ruby try_to_autocomplete_end _ 0;" f class:_m.ruby -_G.keys.ruby _ 0;" t class:_m.ruby -_G.snippets.ruby _ 0;" t class:_m.ruby +ruby _ 0;" t class:_G.keys +ruby _ 0;" t class:keys +ruby _ 0;" t class:_G.snippets +ruby _ 0;" t class:snippets control_structure_patterns _ 0;" t class:_m.ruby sense _ 0;" F class:_m.ruby _m.textadept _ 0;" m @@ -892,7 +910,8 @@ _cancel_current _ 0;" f class:_m.textadept.snippets _insert _ 0;" f class:_m.textadept.snippets _previous _ 0;" f class:_m.textadept.snippets _select _ 0;" f class:_m.textadept.snippets -_G.snippets _ 0;" t class:_m.textadept.snippets +snippets _ 0;" t class:_G +snippets _ 0;" t args _ 0;" m args _ 0;" t class:_G args _ 0;" t |