From 91d84c4643618e080e1f9abb70416ada5d03db73 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 30 Oct 2012 20:45:41 -0400 Subject: Continued updating documentation formatting. --- FAQ.md | 17 +++++---- core/.buffer.luadoc | 37 +++++++++----------- core/.iconv.luadoc | 2 +- core/events.lua | 38 ++++++++++---------- core/file_io.lua | 2 +- core/gui.lua | 9 ++--- core/keys.lua | 6 ++-- doc/01_Introduction.md | 4 +-- doc/02_Installation.md | 36 +++++++++---------- doc/04_WorkingWithFiles.md | 19 +++++----- doc/06_AdeptEditing.md | 36 ++++++++++--------- doc/07_Modules.md | 6 ++-- doc/08_Preferences.md | 19 +++++----- doc/09_Themes.md | 10 +++--- doc/11_Scripting.md | 5 ++- doc/12_Compiling.md | 19 +++++----- doc/14_Appendix.md | 7 +--- doc/images/docstatusbar.png | Bin 3331 -> 3340 bytes modules/lua/api | 79 +++++++++++++++++++++--------------------- modules/lua/tags | 1 - modules/textadept/editing.lua | 2 +- modules/textadept/find.lua | 34 +++++++++--------- 22 files changed, 191 insertions(+), 197 deletions(-) diff --git a/FAQ.md b/FAQ.md index cd3747a7..6314ce56 100644 --- a/FAQ.md +++ b/FAQ.md @@ -8,8 +8,8 @@ How do I fix it? **A:** It is difficult to provide a binary that runs on all Linux platforms since the library versions installed vary widely from distribution to distribution. For -example, `libpng14` has been available for many distributions since late 2009 -while the latest 2012 Ubuntu still uses `libpng12`. Unfortunately in these +example, "libpng14" has been available for many distributions since late 2009 +while the latest 2012 Ubuntu still uses "libpng12". Unfortunately in these cases, the best idea is to compile Textadept. This process is actually very simple though. See the [compiling][] page. Only the GTK+ development libraries are needed for the GUI version. (The ncurses development library is required for @@ -33,7 +33,7 @@ The source version contains all the files necessary for compiling Textadept. Autocompletion does not work for my language. Why not? **A:** -`modules/textadept/key_commands.lua` calls +*modules/textadept/key_commands.lua* calls [`_M.textadept.editing.autocomplete_word()`][] with `'%w_'`, which in [Lua][] is all ASCII alphanumeric characters and underscores. You can add character ranges in `'\xXX-\xXX'` or `'\ddd-\ddd'` [format][] (e.g. `'%w_\127-\255'`). @@ -88,13 +88,12 @@ bug reports. - - - **Q:** -Pressing "Control+O" in the ncurses version on Mac OSX does not do anything. -Why? +Pressing `^O` in the ncurses version on Mac OSX does not do anything. Why? **A:** -For whatever reason, "Control+O" is discarded by the terminal driver. To enable -it, run `stty discard undef` first. You can put the command in your `~/.bashrc` -or `~/.bash_profile` to make it permanent. +For whatever reason, `^O` is discarded by the terminal driver. To enable it, run +`stty discard undef` first. You can put the command in your *~/.bashrc* or +*~/.bash_profile* to make it permanent. - - - @@ -105,7 +104,7 @@ no messages. What can I do? **A:** You likely have old modules that are not compatible with Textadept >= 5. Most offending modules use the `module()` Lua 5.1 function which was removed in Lua -5.2. You can temporarily move your `~/.textadept/` directory elsewhere and +5.2. You can temporarily move your *~/.textadept/* directory elsewhere and restart Textadept to be sure old modules are causing problems. You can correct them using the [migration guide][]. diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc index 8d01f584..85396f86 100644 --- a/core/.buffer.luadoc +++ b/core/.buffer.luadoc @@ -104,8 +104,8 @@ -- The default is the space character. -- @field auto_c_type_separator (number) -- The auto-completion list type-separator character byte. --- The default is `'?'`. Autocompletion list items may display an image as --- well as text. Each image is first registered with an integer type. Then +-- The default is `63` ('?'). Autocompletion list items may display an image +-- as well as text. Each image is first registered with an integer type. Then -- this integer is included in the text of the list separated by a '?' from -- the text. -- @field back_space_un_indents (bool) @@ -625,8 +625,8 @@ -- @field rgba_image_scale (number) -- The scale factor in percent for future RGBA image data. -- This is useful on OSX with a retina display where each display unit is 2 --- pixels: use a factor of 200 so that each image pixel is dsplayed using a --- screen pixel. The default scale, 100, will stretch each image pixel to +-- pixels: use a factor of `200` so that each image pixel is dsplayed using a +-- screen pixel. The default scale, `100`, will stretch each image pixel to -- cover 4 screen pixels on a retina display. -- @field rgba_image_width (number) -- The width for future RGBA image data. @@ -653,8 +653,8 @@ -- The search string should be interpreted as a regular expression. -- * `_SCINTILLA.constants.SCFIND_POSIX` (0x00400000) -- Treat regular expression in a more POSIX compatible manner by --- interpreting bare '(' and ')' for tagged sections rather than "\(" and --- "\)". +-- interpreting bare '(' and ')' for tagged sections rather than "\\(" and +-- "\\)". -- @field sel_alpha (number) -- The alpha of the selection, between `0` (transparent) and `255` (opaque), -- or `256` for no alpha. @@ -963,6 +963,7 @@ function auto_c_select(buffer, string) end --- -- Display an auto-completion list. +-- @param buffer The global buffer. -- @param len_entered The number of characters before the caret used to provide -- the context. -- @param item_list List of words separated by separator characters (initially @@ -1207,9 +1208,9 @@ function contracted_fold_next(buffer, line_start) end -- Converts all line endings in the document to one mode. -- @param buffer The global buffer. -- @param mode The line ending mode. Valid values are: --- `_SCINTILLA.constants.SC_EOL_CRLF` (0), --- `_SCINTILLA.constants.SC_EOL_CR (1)`, or --- `_SCINTILLA.constants.SC_EOL_LF (2)`. +-- * `_SCINTILLA.constants.SC_EOL_CRLF` (0) +-- * `_SCINTILLA.constants.SC_EOL_CR` (1) +-- * `_SCINTILLA.constants.SC_EOL_LF` (2) function convert_eo_ls(buffer, mode) end --- @@ -1282,10 +1283,12 @@ function delete_back(buffer) end --- -- Delete the selection or if no selection, the character before the caret. -- Will not delete the character before at the start of a line. +-- @param buffer The global buffer. function delete_back_not_line(buffer) end --- -- Delete a range of text in the document. +-- @param buffer The global buffer. -- @param pos The start position of the range to delete. -- @param length The length of the range to delete. function delete_range(buffer, pos, length) end @@ -1378,7 +1381,7 @@ function form_feed(buffer) end function get_cur_line(buffer) end --- --- Get the back color for active hotspots in 0xBBGGRR format. +-- Get the back color for active hotspots in "0xBBGGRR" format. -- @param buffer The global buffer. -- @return number function get_hotspot_active_back(buffer) end @@ -1418,15 +1421,6 @@ function get_line_sel_end_position(buffer, line) end -- @param line The line number. function get_line_sel_start_position(buffer, line) end ---- --- Return a read-only pointer to a range of characters in the document. --- May move the gap so that the range is contiguous, but will only move up to --- range_length bytes. --- The gap is not moved unless it is within the requested range so this call can --- be faster than `buffer.character_pointer`. This can be used by application --- code that is able to act on blocks of text or ranges of lines. -function get_range_pointer(buffer, position, range_length) end - --- -- Retrieve the selected text. -- Also returns the length of the text. @@ -2030,7 +2024,7 @@ function replace_sel(buffer, text) end function replace_target(buffer, text) end --- --- Replace the target text with the argument text after \d` processing. +-- Replace the target text with the argument text after `\d` processing. -- Looks for `\d` where `d` is between `1` and `9` and replaces these with the -- strings matched in the last search operation which were surrounded by `\(` -- and `\)`. Returns the length of the replacement text including any change @@ -2115,7 +2109,7 @@ function selection_duplicate(buffer) end -- Reset the set of characters for whitespace and word characters to the -- defaults. -- This sets whitespace to space, tab and other characters with codes less than --- 0x20, with word characters set to alphanumeric and `'_'`. +-- 0x20, with word characters set to alphanumeric and '_'. -- @param buffer The global buffer. function set_chars_default(buffer) end @@ -2651,6 +2645,7 @@ function get_style_name(buffer, style_num) end -- * mod_event_mask -- * paste_convert_endings -- * character_pointer +-- * get_range_pointer -- * identifier -- * key_words -- * technology diff --git a/core/.iconv.luadoc b/core/.iconv.luadoc index fcf199ca..78616a30 100644 --- a/core/.iconv.luadoc +++ b/core/.iconv.luadoc @@ -2,7 +2,7 @@ -- This is a DUMMY FILE used for making LuaDoc for built-in functions in the -- string table. ---- Extends Lua's `string` package to provide character set conversions. +--- Extends Lua's `string` library to provide character set conversions. module('string') --- diff --git a/core/events.lua b/core/events.lua index 3623d1b5..f68b9fed 100644 --- a/core/events.lua +++ b/core/events.lua @@ -78,10 +78,10 @@ local M = {} -- Arguments: -- -- * `code`: The key code. --- * `shift`: The Shift key is held down. --- * `ctrl`: The Control/Command key is held down. --- * `alt`: The Alt/option key is held down. --- * `meta`: The Control key on Mac OSX is held down. +-- * `shift`: The "Shift" modifier key is held down. +-- * `ctrl`: The "Control"/"Command" modifier key is held down. +-- * `alt`: The "Alt"/"Option" modifier key is held down. +-- * `meta`: The "Control" modifier key on Mac OSX is held down. -- @field DOUBLE_CLICK (string) -- Called when the mouse button is double-clicked. -- Arguments: @@ -94,8 +94,8 @@ local M = {} -- `_SCINTILLA.constants.SCMOD_SHIFT`, and -- `_SCINTILLA.constants.SCMOD_META`. -- Note: If you set `buffer.rectangular_selection_modifier` to --- `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both* --- Ctrl and Alt due to a Scintilla limitation with GTK+. +-- `_SCINTILLA.constants.SCMOD_CTRL`, the "Control" modifier is reported as +-- *both* "Control" and "Alt" due to a Scintilla limitation with GTK+. -- @field DWELL_END (string) -- Called after a `DWELL_START` and the mouse is moved or other activity such -- as key press indicates the dwell is over. @@ -137,8 +137,8 @@ local M = {} -- `_SCINTILLA.constants.SCMOD_SHIFT`, and -- `_SCINTILLA.constants.SCMOD_META`. -- Note: If you set `buffer.rectangular_selection_modifier` to --- `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both* --- Ctrl and Alt due to a Scintilla limitation with GTK+. +-- `_SCINTILLA.constants.SCMOD_CTRL`, the "Control" modifier is reported as +-- *both* "Control" and "Alt" due to a Scintilla limitation with GTK+. -- @field HOTSPOT_DOUBLE_CLICK (string) -- Called when the user double clicks on text that is in a style with the -- hotspot attribute set. @@ -151,8 +151,8 @@ local M = {} -- `_SCINTILLA.constants.SCMOD_SHIFT`, and -- `_SCINTILLA.constants.SCMOD_META`. -- Note: If you set `buffer.rectangular_selection_modifier` to --- `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both* --- Ctrl and Alt due to a Scintilla limitation with GTK+. +-- `_SCINTILLA.constants.SCMOD_CTRL`, the "Control" modifier is reported as +-- *both* "Control" and "Alt" due to a Scintilla limitation with GTK+. -- @field HOTSPOT_RELEASE_CLICK (string) -- Called when the user releases the mouse on text that is in a style with the -- hotspot attribute set. @@ -170,8 +170,8 @@ local M = {} -- `_SCINTILLA.constants.SCMOD_SHIFT`, and -- `_SCINTILLA.constants.SCMOD_META`. -- Note: If you set `buffer.rectangular_selection_modifier` to --- `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both* --- Ctrl and Alt due to a Scintilla limitation with GTK+. +-- `_SCINTILLA.constants.SCMOD_CTRL`, the "Control" modifier is reported as +-- *both* "Control" and "Alt" due to a Scintilla limitation with GTK+. -- @field INDICATOR_RELEASE (string) -- Called when the user releases the mouse on text that has an indicator. -- Arguments: @@ -183,10 +183,10 @@ local M = {} -- Arguments: -- -- * `code`: The key code. --- * `shift`: The Shift key is held down. --- * `ctrl`: The Control/Command key is held down. --- * `alt`: The Alt/option key is held down. --- * `meta`: The Control key on Mac OSX is held down. +-- * `shift`: The "Shift" modifier key is held down. +-- * `ctrl`: The "Control"/"Command" modifier key is held down. +-- * `alt`: The "Alt"/"Option" modifier key is held down. +-- * `meta`: The "Control" modifier key on Mac OSX is held down. -- @field MARGIN_CLICK (string) -- Called when the mouse is clicked inside a margin. -- Arguments: @@ -199,8 +199,8 @@ local M = {} -- and `_SCINTILLA.constants.SCI_ALT` to indicate the keys that were held -- down at the time of the margin click. -- Note: If you set `buffer.rectangular_selection_modifier` to --- `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both* --- Ctrl and Alt due to a Scintilla limitation with GTK+. +-- `_SCINTILLA.constants.SCMOD_CTRL`, the "Control" modifier is reported as +-- *both* "Control" and "Alt" due to a Scintilla limitation with GTK+. -- @field MENU_CLICKED (string) -- Called when a menu item is selected. -- Arguments: @@ -283,7 +283,7 @@ M.handlers = {} -- @param f The Lua function to add. -- @param index Optional index to insert the handler into. -- @return Index of handler. --- @usage events.connect('my_event', function(message) gui.print(message) end) +-- @usage events.connect('my_event', function(msg) gui.print(msg) end) -- @see disconnect -- @name connect function M.connect(event, f, index) diff --git a/core/file_io.lua b/core/file_io.lua index cbd93b22..2582933c 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -2,7 +2,7 @@ --[[ This comment is for LuaDoc. --- --- Extends Lua's `io` package with Textadept functions for working with files. +-- Extends Lua's `io` library with Textadept functions for working with files. -- -- ## Working with UTF-8 -- diff --git a/core/gui.lua b/core/gui.lua index 4bc3da8c..3e0db83e 100644 --- a/core/gui.lua +++ b/core/gui.lua @@ -65,8 +65,8 @@ function gui._print(buffer_type, ...) pcall(_print, buffer_type, ...) end function gui.print(...) gui._print(_L['[Message Buffer]'], ...) end --- --- Shortcut function for `gui.dialog('filteredlist', ...)` with 'Ok' and --- 'Cancel' buttons. +-- Shortcut function for `gui.dialog('filteredlist', ...)` with "Ok" and +-- "Cancel" buttons. -- @param title The title for the filtered list dialog. -- @param columns A column name or list of column names. -- @param items An item or list of items. @@ -157,8 +157,9 @@ local THEME -- themes of the same name in *`_HOME`/themes/*. If the name contains slashes -- ('\' on Windows, '/' otherwise), it is assumed to be an absolute path to a -- theme instead of a theme name. An error is thrown if the theme is not found. --- Any errors in the theme are printed to `io.stderr`. --- @param name The name or absolute path of a theme. If nil, sets the default +-- Any errors in the theme are printed to `io.stderr`. Running Textadept from a +-- terminal is the easiest way to see errors as they occur. +-- @param name The name or absolute path of a theme. If `nil`, sets the default -- theme. -- @name set_theme function gui.set_theme(name) diff --git a/core/keys.lua b/core/keys.lua index e3ed5d73..6cd81953 100644 --- a/core/keys.lua +++ b/core/keys.lua @@ -54,7 +54,7 @@ local M = {} -- -- Commands associated with key sequences can be either Lua functions, or -- tables containing Lua functions with a set of arguments to call the function --- with. Examples are +-- with. Examples are: -- -- keys['cn'] = new_buffer -- keys['cs'] = buffer.save @@ -70,7 +70,7 @@ local M = {} -- assigned to one key sequence. Language-specific modules -- [use key chains](#LANGUAGE_MODULE_PREFIX) for their functions. By default, -- the `Esc` (`⎋` on Mac OSX | `Esc` in ncurses) key cancels a key chain, but it --- can be redefined via [`CLEAR`](#CLEAR). An example key chain looks like +-- can be redefined via [`CLEAR`](#CLEAR). An example key chain looks like: -- -- keys['aa'] = { -- a = function1, @@ -105,7 +105,7 @@ local getmetatable = getmetatable local error = function(e) events.emit(events.ERROR, e) end --- --- Lookup table for string representations of GDK key codes higher than 255. +-- Lookup table for string representations of key codes higher than 255. -- Key codes can be identified by temporarily uncommenting the `print()` -- statements in *core/keys.lua* -- @class table diff --git a/doc/01_Introduction.md b/doc/01_Introduction.md index be57529f..2c98e04f 100644 --- a/doc/01_Introduction.md +++ b/doc/01_Introduction.md @@ -45,8 +45,8 @@ commands on-the-fly to handling core events. The possibilities are limitless. This manual uses notation that is worth clarifying. Directories and file paths are represented like this: */path/to/dir/* and -*/path/to/file*. (On Windows machines, "/" and "\" can be used interchangeably -as directory separators.) Any relative paths, paths that do not begin with "/" +*/path/to/file*. (On Windows machines, '/' and '\' can be used interchangeably +as directory separators.) Any relative paths, paths that do not begin with '/' or "C:\", are relative to the location of Textadept. *~/* is denoted as the user's home directory. On Windows machines this is the value of the "USERHOME" environment variable, typically *C:\Users\username\\* or diff --git a/doc/02_Installation.md b/doc/02_Installation.md index b6429840..c4d1cabc 100644 --- a/doc/02_Installation.md +++ b/doc/02_Installation.md @@ -25,11 +25,11 @@ can compile Textadept with earlier versions of GLib down to 2.22. For reference, Ubuntu 11.04, Debian Wheezy, Fedora 15, and openSUSE 11.4 support GLib 2.28 or later. -Most Linux and BSD systems already have ncurses installed. If not, look for it in -your package manager, or compile and install it from the [ncurses website][]. -For Debian-based distributions like Ubuntu, the package is typically called -"libncursesw5". Note: you need to have the wide-character version of ncurses -installed, which handles multibyte characters. +Most Linux and BSD systems already have ncurses installed. If not, look for it +in your package manager, or compile and install it from the [ncurses website][]. +You need to have or compile the wide-character version of ncurses, which handles +multibyte characters. For Debian-based distributions like Ubuntu, the package is +typically called "libncursesw5". [GTK+ website]: http://www.gtk.org/download-linux.html [ncurses website]: http://invisible-island.net/ncurses/#download_ncurses @@ -69,7 +69,7 @@ Unpack the archive anywhere. If you downloaded the set of language-specific modules, unpack it where you unpacked the Textadept archive. The modules will be contained in the -*/path/to/textadept_VERSION/modules/* directory. +*/path/to/textadept_x.x/modules/* directory. ### Mac OSX @@ -88,16 +88,16 @@ Unpack the archive anywhere. If you downloaded the set of language-specific modules, unpack it where you unpacked the Textadept archive. The modules will be contained in the -*textadept_VERSION\modules\\* directory. +*textadept_x.x\modules\\* directory. ## Running ### Linux and BSD -Run Textadept by running */path/to/textadept_VERSION/textadept* from the -terminal. You can also create a symbolic link to the executable in a directory -in your "$PATH" (e.g. */usr/bin/*) or make a GNOME, KDE, XFCE, etc. button or -menu launcher. +Run Textadept by running */path/to/textadept_x.x/textadept* from the terminal. +You can also create a symbolic link to the executable in a directory in your +"$PATH" (e.g. */usr/local/bin/*) or make a GNOME, KDE, XFCE, etc. button or menu +launcher. There is also a *textadeptjit* executable for running Textadept with [LuaJIT][]. Please note there may be [compatibility issues][]. The *textadept* executable is @@ -142,13 +142,13 @@ non-LuaJIT executable is recommended. #### Environment Variables -By default, GUI apps like Textadept do not utilize environment variables like -"$PATH" from your shell profile. Therefore, any [modules][] that use programs -contained in "$PATH" (e.g. the progams in */usr/local/bin/*) for run and compile -commands will not be found. The solution is to follow [these instructions][] to -export whichever environment variables you need. At the very least, set "PATH" -to be "$PATH". You will have to logout and log back in for the changes to take -effect. +By default, Mac OSX GUI apps like Textadept do not utilize environment variables +like "$PATH" from your shell profile. Therefore, any [modules][] that use +programs contained in "$PATH" (e.g. the progams in */usr/local/bin/*) for run +and compile commands will not be found. The solution is to follow +[these instructions][] to export whichever environment variables you need. At +the very least, set "PATH" to be "$PATH". You will have to logout and log back +in for the changes to take effect. [modules]: 07_Modules.html [these instructions]: http://developer.apple.com/library/mac/#qa/qa1067/_index.html diff --git a/doc/04_WorkingWithFiles.md b/doc/04_WorkingWithFiles.md index 6d3958ca..1ea480ce 100644 --- a/doc/04_WorkingWithFiles.md +++ b/doc/04_WorkingWithFiles.md @@ -51,8 +51,8 @@ the "Buffer -> Indentation" menu. #### Line Endings -Line endings, commonly known as end-of-line (EOL) markers, are set based on the -current platform for new files. On Windows, CRLF ("\r\n") is used. Otherwise, LF +Line endings, commonly known as end-of-line (EOL) markers, are set for new files +based on the current platform. On Windows, CRLF ("\r\n") is used. Otherwise, LF ("\n") is. This can be changed manually using the "Buffer -> EOL Mode" menu. Unlike indentation settings, switching EOL modes converts all existing EOLs automatically. Textadept attempts to auto-detect the EOL mode of opened files @@ -86,12 +86,11 @@ files to reopen. By default, Textadept saves its state on exit so it can be restored the next time the editor starts up. You can disable this by passing the `-n` or -`--no-session` switch to Textadept on startup. Sessions can be manually saved -and opened via the "File -> Save Session..." and "File -> Load Session..." -menus. Session files store information such as open buffers, current split -views, caret and scroll positions in each buffer, Textadept's window size, and -recently opened files. Tampering with session files may have unintended -consequences. +`--nosession` switch to Textadept on startup. Sessions can be manually saved and +opened via the "File -> Save Session..." and "File -> Load Session..." menus. +Session files store information such as open buffers, current split views, caret +and scroll positions in each buffer, Textadept's window size, and recently +opened files. Tampering with session files may have unintended consequences. ### Snapopen @@ -133,7 +132,9 @@ Split views are unavailable in ncurses. Individual views have many configurable settings. Among the more useful settings are viewing line endings, handling long lines, viewing indentation guides, and -viewing whitespace. These options change how buffers in the view are displayed. +viewing whitespace. These options change how buffers in the _current_ view are +displayed. Changing a setting in one view does not change that setting in +any other split view. It will have to be done manually. #### Line Endings diff --git a/doc/06_AdeptEditing.md b/doc/06_AdeptEditing.md index 5ac52982..f5db001d 100644 --- a/doc/06_AdeptEditing.md +++ b/doc/06_AdeptEditing.md @@ -45,17 +45,17 @@ The caret also changes to an underline when in overwrite mode. Textadept has many ways of creating and working with selections. Basic selections are what you get when you do things like hold the "Shift" modifier -key (`⇧` on Mac OSX | "Shift" in ncurses) while pressing the arrow keys, click -and drag the mouse over a range of text, or press `Ctrl+A` (`⌘A` | `M-A`) for -"Select All". More advanced selections like multiple and rectangular selections -are more complicated to create, but have powerful uses. +key while pressing the arrow keys, click and drag the mouse over a range of +text, or press `Ctrl+A` (`⌘A` | `M-A`) for "Select All". More advanced +selections like multiple and rectangular selections are more complicated to +create, but have powerful uses. ### Multiple Selection Clicking the mouse at a point in the buffer while holding the "Control" modifier -key (`^` on Mac OSX | N/A in ncurses) places an additional caret at that point. -Clicking and dragging while holding the same modifier creates multiple -selections. When you start typing, the text is mirrored at each selection. +key places an additional caret at that point. Clicking and dragging while +holding the same modifier creates multiple selections. When you start typing, +the text is mirrored at each selection. Creating multiple selections with the mouse is currently unavailable in ncurses. @@ -63,9 +63,8 @@ Creating multiple selections with the mouse is currently unavailable in ncurses. Holding `Alt+Shift` (`⌥⇧` on Mac OSX | `M-S-` in ncurses) and pressing the arrow keys enables rectangular selections to be made. Start typing to type on each -line. You can also hold the "Alt" modifier key ("Super" on Linux | `⌥` on Mac -OSX | N/A in ncurses) while clicking and dragging the mouse to create -rectangular selections. +line. You can also hold the "Alt" modifier key ("Super" on Linux) while clicking +and dragging the mouse to create rectangular selections. ![Rectangular Selection](images/rectangularselection.png)      @@ -78,6 +77,9 @@ change [`buffer.rectangular_selection_modifier`][] in your [theme][]. The "Super" modifier key is usually defined as the left "Windows" key, but may need to be reconfigured too. +Creating rectangular selections with the mouse is currently unavailable in +ncurses. + [`buffer.rectangular_selection_modifier`]: api/buffer.html#rectangular_selection_modifier [theme]: 09_Themes.html#View @@ -91,9 +93,9 @@ selection to the brace character's matching brace. Textadept allows you to select many different entities from the caret. For example, `Ctrl+"` (`^"` on Mac OSX | `M-"` in ncurses) selects all characters in -a double-quoted sequence. Typing `Ctrl++` (`^+` | `M-+`) as a follow-up selects -the double-quotes too. See the "Edit -> Select In..." menu for available -entities and their key bindings. +a double-quoted range. Typing `Ctrl++` (`^+` | `M-+`) as a follow-up selects the +double-quotes too. See the "Edit -> Select In..." menu for available entities +and their key bindings. ### Marks @@ -117,12 +119,14 @@ As a complement to selecting entities, you can enclose text as entities. The "Edit -> Selection -> Enclose In..." menu contains all available entities and their key bindings. -If no text is selected, the word to the left of the caret is enclosed. +If no text is selected, the word to the left of the caret is enclosed. For +example, pressing `Alt+<` (`^<` on Mac OSX | `M->` in ncurses) at the end of a +word encloses it in XML tags. #### Change Case Pressing `Ctrl+Alt+U` or `Ctrl+Alt+Shift+U` (`^U` or `^⇧U` on Mac OSX | `M-^U` -or `M-^L` in ncurses) converts selected text to upper-case letters or lower-case +or `M-^L` in ncurses) converts selected text to uppercase letters or lowercase letters respectively. #### Change Indent Level @@ -223,7 +227,7 @@ highlight syntax incorrectly. Pressing `F5` triggers a full redraw. ### Code Folding -Some lexers support code folding, where blocks of code can be temporarily +Some lexers support "code folding", where blocks of code can be temporarily hidden, making viewing easier. Fold points are denoted by arrows in the margin to the left of the code. Clicking on one toggles the folding for that block of code. You can also press `Ctrl+*` (`⌘*` on Mac OSX | `M-*` in ncurses) to diff --git a/doc/07_Modules.md b/doc/07_Modules.md index f78419ee..fb8faca1 100644 --- a/doc/07_Modules.md +++ b/doc/07_Modules.md @@ -22,13 +22,11 @@ modules when Textadept starts. Language-specific modules have a scope limited to a single programming language. The name of the module is named after the language's lexer in the *lexers/* directory and is automatically loaded when editing source code in that -particular language. In addition to some of the editing features discussed -[earlier][], these kinds of modules typically also have shell commands for +particular language. In addition to the source code editing features discussed +previously, these kinds of modules typically also have shell commands for running and compiling code, indentation settings, custom key bindings, and perhaps a custom context menu. These features are discussed below. -[earlier]: 06_AdeptEditing.html#Source.Code.Editing - ### Compile and Run Most language-specific modules have a command that compiles and/or runs the code diff --git a/doc/08_Preferences.md b/doc/08_Preferences.md index 49e7b4a1..a8b4c15d 100644 --- a/doc/08_Preferences.md +++ b/doc/08_Preferences.md @@ -20,15 +20,16 @@ empty, no modules are loaded (pretty much rendering Textadept useless). It is never recommended to modify the default modules that come with Textadept, even if you just want to change an option in a generic module, modify the buffer -settings for a language-specific module, edit file types, or just add a small -bit of custom code. Those changes may be overwritten when you upgrade Textadept -to a newer version. Instead you have two options: load your own module instead -of the default one, or run your custom module code after the default module -loads. To load your own module, simply place it appropriately in -*~/.textadept/modules/*. To run your module code after a default generic module -loads, put your code in *~/.textadept/init.lua*. To run your module code after a -default language-specific module loads, create a *post_init.lua* Lua script in -the appropriate *~/.textadept/modules/* module folder. +settings for a language-specific module, edit file types, or add a small bit of +custom code. Those changes may be overwritten when you upgrade Textadept to a +newer version. Instead you have two options: load your own module instead of the +default one, or run your custom module code after the default module loads. To +load your own module, simply place it appropriately in *~/.textadept/modules/*. +To run your module code after a default generic module loads, put your code in +*~/.textadept/init.lua*. To run your module code after a default +language-specific module loads, create a *post_init.lua* Lua script in the +appropriate *~/.textadept/modules/* module folder. These methods are discussed +below. ### Generic diff --git a/doc/09_Themes.md b/doc/09_Themes.md index 5d702db3..34d31c4e 100644 --- a/doc/09_Themes.md +++ b/doc/09_Themes.md @@ -31,10 +31,11 @@ elements, resulting in a single, unified theme. In the terminal version of Textadept, colors are determined by your terminal emulator's settings. The only colors recognized by Textadept are the standard black, red, green, yellow, blue, magenta, cyan, white, and bold variants of -those colors. How your terminal chooses to display these colors is up to you. -However, you can still customize which colors are used for particular styles. +those colors. How your terminal chooses to display these colors is up to your +terminal settings. However, you can still customize which colors are used for +particular styles. -[Styles]: api/lexer.html#Styling.Tokens +[Styles]: api/lexer.html#Styles.and.Styling ### Buffer @@ -78,7 +79,8 @@ Behind the scenes, Textadept is setting the theme name in a *~/.textadept/theme* or *~/.textadept/theme_term* file. To use a theme not listed, specify an absolute path to the theme's folder in your *~/.textadept/theme* or *~/.textadept/theme_term* file. When testing themes, any errors that occur are -printed to standard error. +printed to standard error. Running Textadept from a terminal is the easiest way +to see errors as they occur. [language-specific module]: 07_Modules.html#Buffer.Properties diff --git a/doc/11_Scripting.md b/doc/11_Scripting.md index 2f6a659b..facc1a55 100644 --- a/doc/11_Scripting.md +++ b/doc/11_Scripting.md @@ -89,9 +89,8 @@ are located in *lexers/*. ### Modules -Editing modules are contained in *modules/*. These provide advanced text editing -capabilities and can be available for all programming languages or targeted at -specific ones. +Generic and language-specific modules for editing text and source code are +contained in *modules/*. ### Themes diff --git a/doc/12_Compiling.md b/doc/12_Compiling.md index 03cad669..077b726e 100644 --- a/doc/12_Compiling.md +++ b/doc/12_Compiling.md @@ -38,7 +38,7 @@ In addition, BSD users will need to have [libiconv][] installed. Compiling Textadept on Windows is no longer supported. If you wish to do so however, you need a C compiler that supports the C99 standard, the [GTK+ for Windows bundle][] (2.24 is recommended), and [libiconv for Windows][] -(the "Developer files" and "Binaries" zip). +(the "Developer files" and "Binaries" zip files). The preferred way to compile for Windows is cross-compiling from Linux. To do so, in addition to the GTK+ bundle mentioned above, you need [MinGW][] with the @@ -90,12 +90,12 @@ a normal Linux application, run the usual `make` and then `make install` or ### Cross Compiling for Windows When cross-compiling from within Linux, first unzip the GTK+ for Windows bundle -into a new *src/win32gtk* directory. Also, unzip the libiconv zips into the same -directory. Then, depending on your MinGW installation, either run `make win32`, -modify the `CROSS` variable in the "win32" block of *src/Makefile* and run -`make win32`, or run `make CROSS=i486-mingw32- win32` to build +into a new *src/win32gtk/* directory. Also, unzip the libiconv zips into the +same directory. Then, depending on your MinGW installation, either run +`make win32`, modify the `CROSS` variable in the "win32" block of *src/Makefile* +and run `make win32`, or run `make CROSS=i486-mingw32- win32` to build *../textadept.exe* and *../textadeptjit.exe*. Finally, copy the dll files from -*src/win32gtk/bin* to the directory containing the Textadept executables. +*src/win32gtk/bin/* to the directory containing the Textadept executables. Please note that a *lua51.dll* is produced for _only_ the *textadeptjit.exe* because limitations on external Lua library loading do not allow statically @@ -104,7 +104,7 @@ linking LuaJIT to Textadept. ### Cross Compiling for Mac OSX When cross-compiling from within Linux, first unzip the GTK+ for OSX bundle into -a new *src/gtkosx* directory. Then run `make osx` to build *../textadept.osx* +a new *src/gtkosx/* directory. Then run `make osx` to build *../textadept.osx* and *../textadeptjit.osx*. At this point it is recommended to build a new *Textadept.app* from an existing one. Download the most recent app and replace *Contents/MacOS/textadept.osx* and *Contents/MacOS/textadeptjit.osx* with your @@ -126,7 +126,7 @@ to *src/gtkosx* in Textadept. Then open *src/Makefile* and uncomment the *../textadeptjit.osx*. Note: to build a GTK+ for OSX bundle, the following needs to be run from the -*src/* directory before zipping up *gtkosx/include* and *gtkosx/lib*: +*src/* directory before zipping up *gtkosx/include/* and *gtkosx/lib/*: sed -i -e 's|libdir=/Users/username/gtk/inst/lib|libdir=${prefix}/lib|;' \ gtkosx/lib/pkgconfig/*.pc @@ -135,7 +135,8 @@ where `username` is replaced with your username. Compiling the terminal version is not so expensive. After uncommenting the "Darwin" block mentioned above, simply run `make osx-ncurses` to build -*../textadept-ncurses.osx* and *../textadeptjit-ncurses.osx*. +*../textadept-ncurses.osx* and *../textadeptjit-ncurses.osx*. No additional +libraries are needed. [XCode]: http://developer.apple.com/TOOLS/xcode/ [jhbuild]: http://sourceforge.net/apps/trac/gtk-osx/wiki/Build diff --git a/doc/14_Appendix.md b/doc/14_Appendix.md index 4ce299e1..f335f246 100644 --- a/doc/14_Appendix.md +++ b/doc/14_Appendix.md @@ -315,14 +315,9 @@ or and -- File ~/.textadept/init.lua - require 'textadept' + _M.textadept = require 'textadept' _M.foo = require 'foo' -Please remember that, as stated in the documentation, `require 'textadept'` is a -special case and `_M.textadept = require 'textadept'` is not necessary because -of internal dependencies. All other modules need the -`_M.module = require 'module'` construct. - Notice that `_M` is the new module table instead of `_m`. More on this [later](#Global.Module.Table). diff --git a/doc/images/docstatusbar.png b/doc/images/docstatusbar.png index ba77480a..3e096781 100644 Binary files a/doc/images/docstatusbar.png and b/doc/images/docstatusbar.png differ diff --git a/modules/lua/api b/modules/lua/api index 1eb385cf..fc39e735 100644 --- a/modules/lua/api +++ b/modules/lua/api @@ -25,7 +25,7 @@ CLASS _M.textadept.adeptsense.CLASS (string)\nCtags kind for Adeptsense classes. CLASS lexer.CLASS (string)\nToken name for class tokens. CLEAR keys.CLEAR (string)\nThe string representing the key sequence that clears the current key chain.\nIt cannot be part of a key chain.\nThe default value is `'esc'` for the `Esc` (`⎋` on Mac OSX | `Esc` in\nncurses) key. COMMAND_ENTRY_COMMAND events.COMMAND_ENTRY_COMMAND (string)\nCalled when a command is entered into the Command Entry.\nIf any handler returns `true`, the Command Entry does not hide\nautomatically.\nArguments:\n\n* `command`: The command text. -COMMAND_ENTRY_KEYPRESS events.COMMAND_ENTRY_KEYPRESS (string)\nCalled when a key is pressed in the Command Entry.\nIf any handler returns `true`, the key is not inserted into the entry.\nArguments:\n\n* `code`: The key code.\n* `shift`: The Shift key is held down.\n* `ctrl`: The Control/Command key is held down.\n* `alt`: The Alt/option key is held down.\n* `meta`: The Control key on Mac OSX is held down. +COMMAND_ENTRY_KEYPRESS events.COMMAND_ENTRY_KEYPRESS (string)\nCalled when a key is pressed in the Command Entry.\nIf any handler returns `true`, the key is not inserted into the entry.\nArguments:\n\n* `code`: The key code.\n* `shift`: The "Shift" modifier key is held down.\n* `ctrl`: The "Control"/"Command" modifier key is held down.\n* `alt`: The "Alt"/"Option" modifier key is held down.\n* `meta`: The "Control" modifier key on Mac OSX is held down. COMMENT lexer.COMMENT (string)\nToken name for comment tokens. COMPILE_OUTPUT _M.textadept.run._G.events.COMPILE_OUTPUT (string)\nCalled after a compile command is executed.\nBy default, compiler output is printed to the message buffer. To override\nthis behavior, connect to the event with an index of `1` and return `true`.\nArguments:\n\n* `lexer`: The lexer language.\n* `output`: The output from the command. CONSTANT lexer.CONSTANT (string)\nToken name for constant tokens. @@ -41,7 +41,7 @@ Ct lpeg.Ct(patt)\nCreates a table capture. This capture creates a table and puts DEFAULT lexer.DEFAULT (string)\nToken name for default tokens. DEFAULT_DEPTH _M.textadept.snapopen.DEFAULT_DEPTH (number)\nMaximum directory depth to search.\nThe default value is `99`. DEFAULT_SESSION _M.textadept.session.DEFAULT_SESSION (string)\nThe path to the default session file.\nThe default value is *`_USERHOME`/session*, or *`_USERHOME`/session_term*\nif `_G.NCURSES` is `true`. -DOUBLE_CLICK events.DOUBLE_CLICK (string)\nCalled when the mouse button is double-clicked.\nArguments:\n\n* `position`: The text position of the double click.\n* `line`: The line of the double click.\n* `modifiers`: The key modifiers held down. It is a combination of zero or\n more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both*\n Ctrl and Alt due to a Scintilla limitation with GTK+. +DOUBLE_CLICK events.DOUBLE_CLICK (string)\nCalled when the mouse button is double-clicked.\nArguments:\n\n* `position`: The text position of the double click.\n* `line`: The line of the double click.\n* `modifiers`: The key modifiers held down. It is a combination of zero or\n more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the "Control" modifier is reported as\n *both* "Control" and "Alt" due to a Scintilla limitation with GTK+. DWELL_END events.DWELL_END (string)\nCalled after a `DWELL_START` and the mouse is moved or other activity such\nas key press indicates the dwell is over.\nArguments:\n\n* `position`: The nearest position in the document to the position where\n the mouse pointer was lingering.\n* `x`: Where the pointer lingered.\n* `y`: Where the pointer lingered. DWELL_START events.DWELL_START (string)\nCalled when the user keeps the mouse in one position for the dwell period\n(see `_SCINTILLA.constants.SCI_SETMOUSEDWELLTIME`).\nArguments:\n\n* `position`: The nearest position in the document to the position where\n the mouse pointer was lingering.\n* `x`: Where the pointer lingered.\n* `y`: Where the pointer lingered. EDGE_BACKGROUND _SCINTILLA.constants.EDGE_BACKGROUND\n2 @@ -62,14 +62,14 @@ FUNCTION _M.textadept.adeptsense.FUNCTION (string)\nCtags kind for Adeptsense fu FUNCTION lexer.FUNCTION (string)\nToken name for function tokens. FUNCTIONS _M.textadept.adeptsense.FUNCTIONS (string)\nXPM image for Adeptsense functions. HIGHLIGHT_BRACES _M.textadept.editing.HIGHLIGHT_BRACES (bool)\nHighlight matching "()[]{}" characters.\nThe default value is `true`.\nMatching braces are defined in the `braces` table. -HOTSPOT_CLICK events.HOTSPOT_CLICK (string)\nCalled when the user clicks on text that is in a style with the hotspot\nattribute set.\nArguments:\n\n* `position`: The text position of the click.\n* `modifiers`: The key modifiers held down. It is a combination of zero or\n more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both*\n Ctrl and Alt due to a Scintilla limitation with GTK+. -HOTSPOT_DOUBLE_CLICK events.HOTSPOT_DOUBLE_CLICK (string)\nCalled when the user double clicks on text that is in a style with the\nhotspot attribute set.\nArguments:\n\n* `position`: The text position of the double click.\n* `modifiers`: The key modifiers held down. It is a combination of zero or\n more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both*\n Ctrl and Alt due to a Scintilla limitation with GTK+. +HOTSPOT_CLICK events.HOTSPOT_CLICK (string)\nCalled when the user clicks on text that is in a style with the hotspot\nattribute set.\nArguments:\n\n* `position`: The text position of the click.\n* `modifiers`: The key modifiers held down. It is a combination of zero or\n more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the "Control" modifier is reported as\n *both* "Control" and "Alt" due to a Scintilla limitation with GTK+. +HOTSPOT_DOUBLE_CLICK events.HOTSPOT_DOUBLE_CLICK (string)\nCalled when the user double clicks on text that is in a style with the\nhotspot attribute set.\nArguments:\n\n* `position`: The text position of the double click.\n* `modifiers`: The key modifiers held down. It is a combination of zero or\n more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the "Control" modifier is reported as\n *both* "Control" and "Alt" due to a Scintilla limitation with GTK+. HOTSPOT_RELEASE_CLICK events.HOTSPOT_RELEASE_CLICK (string)\nCalled when the user releases the mouse on text that is in a style with the\nhotspot attribute set.\nArguments:\n\n* `position`: The text position of the release. IDENTIFIER lexer.IDENTIFIER (string)\nToken name for identifier tokens. INDIC0_MASK _SCINTILLA.constants.INDIC0_MASK\n32 INDIC1_MASK _SCINTILLA.constants.INDIC1_MASK\n64 INDIC2_MASK _SCINTILLA.constants.INDIC2_MASK\n128 -INDICATOR_CLICK events.INDICATOR_CLICK (string)\nCalled when the user clicks the mouse on text that has an indicator.\nArguments:\n\n* `position`: The text position of the click.\n* `modifiers`: The key modifiers held down. It is a combination of zero or\n more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both*\n Ctrl and Alt due to a Scintilla limitation with GTK+. +INDICATOR_CLICK events.INDICATOR_CLICK (string)\nCalled when the user clicks the mouse on text that has an indicator.\nArguments:\n\n* `position`: The text position of the click.\n* `modifiers`: The key modifiers held down. It is a combination of zero or\n more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the "Control" modifier is reported as\n *both* "Control" and "Alt" due to a Scintilla limitation with GTK+. INDICATOR_RELEASE events.INDICATOR_RELEASE (string)\nCalled when the user releases the mouse on text that has an indicator.\nArguments:\n\n* `position`: The text position of the release. INDICS_MASK _SCINTILLA.constants.INDICS_MASK\n224 INDIC_BOX _SCINTILLA.constants.INDIC_BOX\n6 @@ -91,14 +91,14 @@ INDIC_STRAIGHTBOX _SCINTILLA.constants.INDIC_STRAIGHTBOX\n8 INDIC_STRIKE _SCINTILLA.constants.INDIC_STRIKE\n4 INDIC_TT _SCINTILLA.constants.INDIC_TT\n2 INVALID_POSITION _SCINTILLA.constants.INVALID_POSITION\n-1 -KEYPRESS events.KEYPRESS (string)\nCalled when a key is pressed.\nIf any handler returns `true`, the key is not inserted into the buffer.\nArguments:\n\n* `code`: The key code.\n* `shift`: The Shift key is held down.\n* `ctrl`: The Control/Command key is held down.\n* `alt`: The Alt/option key is held down.\n* `meta`: The Control key on Mac OSX is held down. +KEYPRESS events.KEYPRESS (string)\nCalled when a key is pressed.\nIf any handler returns `true`, the key is not inserted into the buffer.\nArguments:\n\n* `code`: The key code.\n* `shift`: The "Shift" modifier key is held down.\n* `ctrl`: The "Control"/"Command" modifier key is held down.\n* `alt`: The "Alt"/"Option" modifier key is held down.\n* `meta`: The "Control" modifier key on Mac OSX is held down. KEYSYMS keys.KEYSYMS (table)\nLookup table for string representations of GDK key codes higher than 255.\nKey codes can be identified by temporarily uncommenting the `print()`\nstatements in *core/keys.lua* KEYWORD lexer.KEYWORD (string)\nToken name for keyword tokens. KEYWORDSET_MAX _SCINTILLA.constants.KEYWORDSET_MAX\n8 LABEL lexer.LABEL (string)\nToken name for label tokens. LANGUAGE_MODULE_LOADED _M.textadept.mime_types._G.events.LANGUAGE_MODULE_LOADED (string)\nCalled after loading a language-specific module.\nThis is useful for overriding a language-specific module's key bindings\nor other properties since the module is not loaded when Textadept starts.\nArguments:\n\n* `lang`: The language lexer name. LANGUAGE_MODULE_PREFIX keys.LANGUAGE_MODULE_PREFIX (string)\nThe starting key command of the key chain reserved for language-specific\nmodules.\nThe default value is `Ctrl+L` (`⌘L` on Mac OSX | `M-L` in ncurses). -MARGIN_CLICK events.MARGIN_CLICK (string)\nCalled when the mouse is clicked inside a margin.\nArguments:\n\n* `margin`: The margin number that was clicked.\n* `position`: The position of the start of the line in the buffer that\n corresponds to the margin click.\n* `modifiers`: The appropriate combination of\n `_SCINTILLA.constants.SCI_SHIFT`, `_SCINTILLA.constants.SCI_CTRL`,\n and `_SCINTILLA.constants.SCI_ALT` to indicate the keys that were held\n down at the time of the margin click.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both*\n Ctrl and Alt due to a Scintilla limitation with GTK+. +MARGIN_CLICK events.MARGIN_CLICK (string)\nCalled when the mouse is clicked inside a margin.\nArguments:\n\n* `margin`: The margin number that was clicked.\n* `position`: The position of the start of the line in the buffer that\n corresponds to the margin click.\n* `modifiers`: The appropriate combination of\n `_SCINTILLA.constants.SCI_SHIFT`, `_SCINTILLA.constants.SCI_CTRL`,\n and `_SCINTILLA.constants.SCI_ALT` to indicate the keys that were held\n down at the time of the margin click.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the "Control" modifier is reported as\n *both* "Control" and "Alt" due to a Scintilla limitation with GTK+. MARKER_MAX _SCINTILLA.constants.MARKER_MAX\n31 MARK_BOOKMARK_COLOR _M.textadept.bookmarks.MARK_BOOKMARK_COLOR (number)\nThe color used for a bookmarked line in "0xBBGGRR" format. MARK_HIGHLIGHT_BACK _M.textadept.editing.MARK_HIGHLIGHT_BACK (number)\nThe background color used for a line containing a\nhighlighted word in "0xBBGGRR" format. @@ -832,9 +832,9 @@ auto_c_max_width buffer.auto_c_max_width (number)\nThe maximum width, in charact auto_c_pos_start buffer.auto_c_pos_start(buffer)\nRetrieve the position of the caret when the auto-completion list was\ndisplayed.\n@param buffer The global buffer.\n@return number auto_c_select buffer.auto_c_select(buffer, string)\nSelect the item in the auto-completion list that starts with a string.\nBy default, comparisons are case sensitive, but this can change with\n`buffer.auto_c_ignore_case`.\n@param buffer The global buffer. auto_c_separator buffer.auto_c_separator (number)\nThe auto-completion list separator character byte.\nThe default is the space character. -auto_c_show buffer.auto_c_show(buffer, len_entered, item_list)\nDisplay an auto-completion list.\n@param len_entered The number of characters before the caret used to provide\n the context.\n@param item_list List of words separated by separator characters (initially\n spaces). The list of words should be in sorted order. +auto_c_show buffer.auto_c_show(buffer, len_entered, item_list)\nDisplay an auto-completion list.\n@param buffer The global buffer.\n@param len_entered The number of characters before the caret used to provide\n the context.\n@param item_list List of words separated by separator characters (initially\n spaces). The list of words should be in sorted order. auto_c_stops buffer.auto_c_stops(buffer, chars)\nDefine a set of characters that when typed cancel the auto-completion list.\n@param buffer The global buffer.\n@param chars String list of characters. This list is empty by default. -auto_c_type_separator buffer.auto_c_type_separator (number)\nThe auto-completion list type-separator character byte.\nThe default is `'?'`. Autocompletion list items may display an image as\nwell as text. Each image is first registered with an integer type. Then\nthis integer is included in the text of the list separated by a '?' from\nthe text. +auto_c_type_separator buffer.auto_c_type_separator (number)\nThe auto-completion list type-separator character byte.\nThe default is `63` ('?'). Autocompletion list items may display an image\nas well as text. Each image is first registered with an integer type. Then\nthis integer is included in the text of the list separated by a '?' from\nthe text. autocomplete_word _M.textadept.editing.autocomplete_word(word_chars, default_words)\nPops up an autocompletion list for the current word based on other words in\nthe document.\n@param word_chars String of characters considered to be part of words. Since\n this string is used in a Lua pattern character set, character classes and\n ranges may be used.\n@param default_words Optional list of words considered to be in the document,\n even if they are not. Words may contain registered images.\n@usage _M.textadept.editing.autocomplete_word('%w_')\n@return `true` if there were completions to show; `false` otherwise. back_space_un_indents buffer.back_space_un_indents (bool)\nWhether a backspace pressed when caret is within indentation unindents. back_tab buffer.back_tab(buffer)\nDedent the selected lines.\n@param buffer The global buffer. @@ -850,7 +850,7 @@ brace_bad_light buffer.brace_bad_light(buffer, pos)\nHighlight the character at brace_bad_light_indicator buffer.brace_bad_light_indicator(buffer, use_indicator, indic_num)\nUse specified indicator to highlight non matching brace instead of changing\nits style.\n@param buffer The global buffer.\n@param use_indicator Use an indicator.\n@param indic_num The indicator number. brace_highlight buffer.brace_highlight(buffer, pos1, pos2)\nHighlight the characters at two positions.\nIf indent guides are enabled, the indent that corresponds with the brace can\nbe highlighted by locating the column with `buffer.column` and highlight the\nindent with `buffer.highlight_guide`.\n@param buffer The global buffer.\n@param pos1 The first position.\n@param pos2 The second position. brace_highlight_indicator buffer.brace_highlight_indicator(buffer, use_indicator, indic_num)\nUse specified indicator to highlight matching braces instead of changing\ntheir style.\n@param buffer The global buffer.\n@param use_indicator Use an indicator.\n@param indic_num The indicator number. -brace_match buffer.brace_match(buffer, pos)\nFind the position of a matching brace or `-1` if no match.\nThe brace characters handled are '(', ')', '[', ']', '{', '}'`, '<', and '>'.\nThe search is forwards from an opening brace and backwards from a closing\nbrace. A match only occurs if the style of the matching brace is the same as\nthe starting brace or the matching brace is beyond the end of styling. Nested\nbraces are handled correctly.\n@param buffer The global buffer.\n@param pos The position.\n@return number. +brace_match buffer.brace_match(buffer, pos)\nFind the position of a matching brace or `-1` if no match.\nThe brace characters handled are '(', ')', '[', ']', '{', '}', '<', and '>'.\nThe search is forwards from an opening brace and backwards from a closing\nbrace. A match only occurs if the style of the matching brace is the same as\nthe starting brace or the matching brace is beyond the end of styling. Nested\nbraces are handled correctly.\n@param buffer The global buffer.\n@param pos The position.\n@return number. braces _M.textadept.editing.braces (table)\nHighlighted brace characters.\nKeys are lexer language names and values are tables of character ASCII values\nthat count as brace characters. The defaults are '(', ')', '[', ']', '{', and\n'}'.\nThis table can be populated by language-specific modules.\n@see HIGHLIGHT_BRACES btest bit32.btest(...)\nReturns a boolean signaling whether the bitwise "and" of its operands is\ndifferent from zero. buffer _G.buffer (module)\nA Textadept buffer object.\nBe careful when storing references to a buffer object because if you attempt\ncall a buffer function with a non-global buffer, you will get an error. See\n`check_global()` for more information. @@ -926,7 +926,7 @@ complete _M.textadept.adeptsense.complete(sense, only_fields, only_functions)\nS completions _M.textadept.adeptsense.completions (table)\nContains lists of possible completions for known symbols.\nEach symbol key has a table value that contains a list of field completions\nwith a `fields` key and a list of functions completions with a `functions`\nkey. This table is normally populated by `load_ctags()`, but can also be set\nby the user. concat table.concat(list [, sep [, i [, j]]])\nGiven a list where all elements are strings or numbers, returns\n`list[i]..sep..list[i+1] ··· sep..list[j]`. The default value for `sep` is\nthe empty string, the default for `i` is 1, and the default for `j` is\n`#list`. If `i` is greater than `j`, returns the empty string. config package.config (string)\nA string describing some compile-time configurations for packages. This\nstring is a sequence of lines:\n The first line is the directory separator string. Default is '`\`' for\n Windows and '`/`' for all other systems.\n The second line is the character that separates templates in a path.\n Default is '`;`'.\n The third line is the string that marks the substitution points in a\n template. Default is '`?`'.\n The fourth line is a string that, in a path in Windows, is replaced by\n the executable's directory. Default is '`!`'.\n The fifth line is a mark to ignore all text before it when building the\n `luaopen_` function name. Default is '`-`'. -connect events.connect(event, f, index)\nAdds a handler function to an event.\n@param event The string event name. It is arbitrary and does not need to be\n defined previously.\n@param f The Lua function to add.\n@param index Optional index to insert the handler into.\n@usage events.connect('my_event', function(message) gui.print(message) end)\n@return Index of handler.\n@see disconnect +connect events.connect(event, f, index)\nAdds a handler function to an event.\n@param event The string event name. It is arbitrary and does not need to be\n defined previously.\n@param f The Lua function to add.\n@param index Optional index to insert the handler into.\n@usage events.connect('my_event', function(msg) gui.print(msg) end)\n@return Index of handler.\n@see disconnect constants _SCINTILLA.constants (table)\nScintilla constants.\nEach key is a Scintilla constant with its associated numeric value. context_menu _M.textadept.menu.context_menu (table)\nContains the default right-click context menu.\n@see set_contextmenu context_menu gui.context_menu\nA `gui.menu` defining the editor's context menu. @@ -934,7 +934,7 @@ contracted_fold_next buffer.contracted_fold_next(buffer, line_start)\nFind the n control_char_symbol buffer.control_char_symbol (number)\nThe way control characters are displayed.\nIf less than `32`, keep the rounded rectangle as ASCII mnemonics.\nOtherwise, use the given character byte. The default value is `0`. control_structure_patterns _M.lua.control_structure_patterns (table)\nPatterns for auto `end` completion for control structures.\n@see try_to_autocomplete_end control_structure_patterns _M.ruby.control_structure_patterns (table)\nPatterns for auto `end` completion for control structures.\n@see try_to_autocomplete_end -convert_eo_ls buffer.convert_eo_ls(buffer, mode)\nConverts all line endings in the document to one mode.\n@param buffer The global buffer.\n@param mode The line ending mode. Valid values are:\n `_SCINTILLA.constants.SC_EOL_CRLF` (0),\n `_SCINTILLA.constants.SC_EOL_CR (1)`, or\n `_SCINTILLA.constants.SC_EOL_LF (2)`. +convert_eo_ls buffer.convert_eo_ls(buffer, mode)\nConverts all line endings in the document to one mode.\n@param buffer The global buffer.\n@param mode The line ending mode. Valid values are:\n * `_SCINTILLA.constants.SC_EOL_CRLF` (0)\n * `_SCINTILLA.constants.SC_EOL_CR` (1)\n * `_SCINTILLA.constants.SC_EOL_LF` (2) convert_indentation _M.textadept.editing.convert_indentation()\nConverts indentation between tabs and spaces.\nIf `buffer.use_tabs` is `true`, all indenting spaces are converted to tabs.\nOtherwise, all indenting tabs are converted to spaces.\n@see buffer.use_tabs copy buffer.copy(buffer)\nCopy the selection to the clipboard.\n@param buffer The buffer copy_allow_line buffer.copy_allow_line(buffer)\nCopy the selection, if selection empty copy the line with the caret.\n@param buffer The global buffer. @@ -969,9 +969,9 @@ del_word_right buffer.del_word_right(buffer)\nDelete the word to the right of th del_word_right_end buffer.del_word_right_end(buffer)\nDelete the word to the right of the caret, but not the trailing non-word\ncharacters.\n@param buffer The global buffer. delete buffer.delete(buffer)\nDeletes the current buffer.\nWARNING: this function should NOT be called via scripts. Use `buffer:close()`\ninstead, which prompts for confirmation if necessary. Emits a\n`BUFFER_DELETED` event.\n@param buffer The global buffer.\n@see events.BUFFER_DELETED delete_back buffer.delete_back(buffer)\nDelete the selection or if no selection, the character before the caret.\n@param buffer The global buffer. -delete_back_not_line buffer.delete_back_not_line(buffer)\nDelete the selection or if no selection, the character before the caret.\nWill not delete the character before at the start of a line. -delete_range buffer.delete_range(buffer, pos, length)\nDelete a range of text in the document.\n@param pos The start position of the range to delete.\n@param length The length of the range to delete. -delimited_range lexer.delimited_range(chars, escape, end_optional, balanced, forbidden)\nCreates and returns a pattern that matches a range of characters delimited by\nthe given character(s).\nThis is a convenience function for matching more complicated delimited ranges\nlike strings with escape characters and balanced parentheses.\n@param chars The character(s) that bound the matched range.\n@param escape Optional escape character. This parameter may `nil` or the\n empty string to indicate no escape character.\n@param end_optional Optional flag indicating whether or not an ending\n delimiter is optional or not. If `true`, the range begun by the start\n delimiter matches until an end delimiter or the end of the input is\n reached.\n@param balanced Optional flag indicating whether or not a balanced range is\n matched, like the `%b` Lua pattern. This flag only applies if `chars`\n consists of two different characters (e.g. `()`).\n@param forbidden Optional string of characters forbidden in a delimited\n range. Each character is part of the set. This is particularly useful for\n disallowing newlines in delimited ranges.\n@usage local sq_str_noescapes = delimited_range("'", nil, true)\n@usage local sq_str_escapes = delimited_range("'", '\\', true)\n@usage local unbalanced_parens = delimited_range('()', '\\')\n@usage local balanced_parens = delimited_range('()', '\\', false, true)\n@return pattern +delete_back_not_line buffer.delete_back_not_line(buffer)\nDelete the selection or if no selection, the character before the caret.\nWill not delete the character before at the start of a line.\n@param buffer The global buffer. +delete_range buffer.delete_range(buffer, pos, length)\nDelete a range of text in the document.\n@param buffer The global buffer.\n@param pos The start position of the range to delete.\n@param length The length of the range to delete. +delimited_range lexer.delimited_range(chars, escape, end_optional, balanced, forbidden)\nCreates and returns a pattern that matches a range of characters delimited by\nthe given character(s).\nThis is a convenience function for matching more complicated delimited ranges\nlike strings with escape characters and balanced parentheses.\n@param chars The character(s) that bound the matched range.\n@param escape Optional escape character. This parameter may `nil` or the\n empty string to indicate no escape character.\n@param end_optional Optional flag indicating whether or not an ending\n delimiter is optional or not. If `true`, the range begun by the start\n delimiter matches until an end delimiter or the end of the input is\n reached.\n@param balanced Optional flag indicating whether or not a balanced range is\n matched, like the "%b" Lua pattern. This flag only applies if `chars`\n consists of two different characters (e.g. "()").\n@param forbidden Optional string of characters forbidden in a delimited\n range. Each character is part of the set. This is particularly useful for\n disallowing newlines in delimited ranges.\n@usage local sq_str_noescapes = delimited_range("'", nil, true)\n@usage local sq_str_escapes = delimited_range("'", '\\', true)\n@usage local unbalanced_parens = delimited_range('()', '\\')\n@usage local balanced_parens = delimited_range('()', '\\', false, true)\n@return pattern\n@see nested_pair dialog gui.dialog(kind, ...)\nDisplays a gtdialog of a specified type with the given string arguments.\nEach argument is like a string in Lua's `arg` table. Tables of strings are\nallowed as arguments and are expanded in place. This is useful for\nfiltered list dialogs with many items.\nFor more information on gtdialog, see http://foicica.com/gtdialog.\n@param kind The kind of gtdialog.\n@param ... Parameters to the gtdialog.\n@return string gtdialog result. difftime os.difftime(t2, t1)\nReturns the number of seconds from time `t1` to time `t2`. In POSIX,\nWindows, and some other systems, this value is exactly `t2`*-*`t1`. digit lexer.digit (pattern)\nMatches any digit (`0-9`). @@ -1021,18 +1021,18 @@ extract bit32.extract(n, field [, width])\nReturns the unsigned number formed by filename buffer.filename (string)\nThe absolute path to the file associated with this buffer.\nIt is encoded in UTF-8. Use `string.iconv()` for\ncharset conversions. filter_through _M.textadept.filter_through (module)\nFilters text through shell commands. filter_through _M.textadept.filter_through.filter_through()\nPrompts for a Linux, BSD, Mac OSX, or Windows shell command to filter text\nthrough.\nThe standard input (stdin) for shell commands is determined as follows:\n\n1. If text is selected and spans multiple lines, all text on the lines\ncontaining the selection is used. However, if the end of the selection is at\nthe 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.\n2. If text is selected and spans a single line, only the selected text is\nused.\n3. If no text is selected, the entire buffer is used.\n\nThe input text is replaced with the standard output (stdout) of the command. -filteredlist gui.filteredlist(title, columns, items, int_return, ...)\nShortcut function for `gui.dialog('filteredlist', ...)` with 'Ok' and\n'Cancel' buttons.\n@param title The title for the filtered list dialog.\n@param columns A column name or list of column names.\n@param items An item or list of items.\n@param int_return If `true`, returns the integer index of the selected item\n in the filtered list and is not compatible with the `'--select-multiple'`\n option. The default value is `false`, which returns the string item(s).\n@param ... Additional parameters to pass to `gui.dialog()`.\n@usage gui.filteredlist('Title', 'Foo', { 'Bar', 'Baz' })\n@usage gui.filteredlist('Title', { 'Foo', 'Bar' }, { 'a', 'b', 'c', 'd' },\n false, '--output-column', '2')\n@return Either a string or integer on success; `nil` otherwise. In strings,\n multiple items are separated by newlines.\n@see dialog +filteredlist gui.filteredlist(title, columns, items, int_return, ...)\nShortcut function for `gui.dialog('filteredlist', ...)` with "Ok" and\n"Cancel" buttons.\n@param title The title for the filtered list dialog.\n@param columns A column name or list of column names.\n@param items An item or list of items.\n@param int_return If `true`, returns the integer index of the selected item\n in the filtered list and is not compatible with the `'--select-multiple'`\n option. The default value is `false`, which returns the string item(s).\n@param ... Additional parameters to pass to `gui.dialog()`.\n@usage gui.filteredlist('Title', 'Foo', { 'Bar', 'Baz' })\n@usage gui.filteredlist('Title', { 'Foo', 'Bar' }, { 'a', 'b', 'c', 'd' },\n false, '--output-column', '2')\n@return Either a string or integer on success; `nil` otherwise. In strings,\n multiple items are separated by newlines.\n@see dialog find gui.find (module)\nTextadept's Find & Replace pane. find string.find(s, pattern [, init [, plain]])\nLooks for the first match of `pattern` in the string `s`. If it finds a\nmatch, then `find` returns the indices of `s` where this occurrence starts\nand ends; otherwise, it returns nil. A third, optional numerical argument\n`init` specifies where to start the search; its default value is 1 and\ncan be negative. A value of true as a fourth, optional argument `plain`\nturns off the pattern matching facilities, so the function does a plain\n"find substring" operation, with no characters in `pattern` being considered\nmagic. Note that if `plain` is given, then `init` must be given as well.\n\nIf the pattern has captures, then in a successful match the captured values\nare also returned, after the two indices. find_column buffer.find_column(buffer, line, column)\nFind the position of a column on a line taking into account tabs and\nmulti-byte characters.\nIf beyond end of line, return line end position.\n@param buffer The global buffer.\n@param line The line number.\n@param column The column number. find_entry_text gui.find.find_entry_text (string)\nThe text in the find entry. find_in_files gui.find.find_in_files(utf8_dir)\nSearches the given directory for files that match search text and options and\nprints the results to a buffer.\nUse the `find_text`, `match_case`, `whole_word`, and `lua` fields to set the\nsearch text and option flags, respectively.\n@param utf8_dir UTF-8 encoded directory name. If `nil`, the user is prompted\nfor one. find_incremental gui.find.find_incremental()\nBegins an incremental find using the command entry.\nOnly the `match_case` find option is recognized. Normal command entry\nfunctionality will be unavailable until the search is finished by pressing\n`Esc` (`⎋` on Mac OSX | `Esc` in ncurses). -find_label_text gui.find.find_label_text (string, Write-only)\nThe text of the 'Find' label.\nThis is primarily used for localization. -find_next gui.find.find_next()\nMimicks a press of the 'Find Next' button. -find_next_button_text gui.find.find_next_button_text (string, Write-only)\nThe text of the 'Find Next' button.\nThis is primarily used for localization. -find_prev gui.find.find_prev()\nMimicks a press of the 'Find Prev' button. -find_prev_button_text gui.find.find_prev_button_text (string, Write-only)\nThe text of the 'Find Prev' button.\nThis is primarily used for localization. +find_label_text gui.find.find_label_text (string, Write-only)\nThe text of the "Find" label.\nThis is primarily used for localization. +find_next gui.find.find_next()\nMimicks a press of the "Find Next" button. +find_next_button_text gui.find.find_next_button_text (string, Write-only)\nThe text of the "Find Next" button.\nThis is primarily used for localization. +find_prev gui.find.find_prev()\nMimicks a press of the "Find Prev" button. +find_prev_button_text gui.find.find_prev_button_text (string, Write-only)\nThe text of the "Find Prev" button.\nThis is primarily used for localization. first_visible_line buffer.first_visible_line (number)\nThe display line at the top of the display. float lexer.float (pattern)\nMatches a floating point number. floor math.floor(x)\nReturns the largest integer smaller than or equal to `x`. @@ -1042,7 +1042,7 @@ fmod math.fmod(x, y)\nReturns the remainder of the division of `x` by `y` that r focus buffer.focus (bool)\nThe internal focus flag. focus gui.command_entry.focus()\nFocuses the command entry. focus gui.find.focus()\nDisplays and focuses the Find & Replace pane. -fold lexer.fold(text, start_pos, start_line, start_level)\nFolds the given text.\nCalled by the Scintilla lexer; **do not call from Lua**.\nIf the current lexer has a `_fold` function or a `_foldsymbols` table, it is\nused to perform folding. Otherwise, if a `fold.by.indentation` property is\nset, folding by indentation is done.\n@param text The document text to fold.\n@param start_pos The position in the document text starts at.\n@param start_line The line number text starts on.\n@param start_level The fold level text starts on.\n@return table of fold levels. +fold lexer.fold(text, start_pos, start_line, start_level)\nFolds the given text.\nCalled by the Scintilla lexer; **do not call from Lua**.\nIf the current lexer has a `_fold` function or a `_foldsymbols` table, it is\nused to perform folding. Otherwise, if a "fold.by.indentation" property is\nset, folding by indentation is done.\n@param text The document text to fold.\n@param start_pos The position in the document text starts at.\n@param start_line The line number text starts on.\n@param start_level The fold level text starts on.\n@return table of fold levels. fold_expanded buffer.fold_expanded (bool)\nExpanded state of a header line. fold_flags buffer.fold_flags (number)\nThe style options for folding.\nBits set in flags determine where folding lines are drawn:\n\n* `_SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_EXPANDED` (2)\n Draw above if expanded.\n* `_SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_CONTRACTED` (4)\n Draw above if not expanded.\n* `_SCINTILLA.constants.SC_FOLDFLAG_LINEAFTER_EXPANDED` (8)\n Draw below if expanded.\n* `_SCINTILLA.constants.SC_FOLDFLAG_LINEAFTER_CONTRACTED` (16)\n Draw below if not expanded. fold_level buffer.fold_level (table)\nTable of fold levels for lines starting from zero.\nFold levels encodes an integer level along with flags indicating whether\nthe line is a header and whether it is effectively white space.\n\n* `_SCINTILLA.constants.SC_FOLDLEVELBASE` (0x400)\n Initial fold level.\n* `_SCINTILLA.constants.SC_FOLDLEVELWHITEFLAG` (0x1000)\n Indicates that the line is blank.\n* `_SCINTILLA.constants.SC_FOLDLEVELHEADERFLAG` (0x2000)\n Indicates that the line is a header (fold point). @@ -1059,7 +1059,7 @@ get_class _M.textadept.adeptsense.get_class(sense, symbol)\nReturns the class na get_completions _M.textadept.adeptsense.get_completions(sense, symbol, only_fields, only_functions)\nReturns a list of completions for the given symbol.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param symbol The symbol to get completions for.\n@param only_fields If `true`, returns list of only fields. The default value\n is `false`.\n@param only_functions If `true`, returns list of only functions. The default\n value is `false`.\n@return completion_list or `nil` get_cur_line buffer.get_cur_line(buffer)\nRetrieve the text of the line containing the caret.\nAlso returns the index of the caret on the line.\n@param buffer The global buffer.\n@return string, number get_fold_level lexer.get_fold_level(line_number)\nReturns the fold level for a given line.\nThis level already has `SC_FOLDLEVELBASE` added to it, so you do not need to\nadd it yourself.\n@param line_number The line number to get the fold level of.\n@return integer fold level -get_hotspot_active_back buffer.get_hotspot_active_back(buffer)\nGet the back color for active hotspots in 0xBBGGRR format.\n@param buffer The global buffer.\n@return number +get_hotspot_active_back buffer.get_hotspot_active_back(buffer)\nGet the back color for active hotspots in "0xBBGGRR" format.\n@param buffer The global buffer.\n@return number get_hotspot_active_fore buffer.get_hotspot_active_fore(buffer)\nGet the fore color for active hotspots.\n@param buffer The global buffer.\n@return number get_indent_amount lexer.get_indent_amount(line)\nReturns the indent amount of text for a given line.\n@param line The line number to get the indent amount of.\n@return integer indent amount get_last_child buffer.get_last_child(buffer, header_line, level)\nFind the last child line of a header line.\n@param buffer The global buffer.\n@param header_line The line number of a header line.\n@param level The level or `-1` for the level of header_line. @@ -1068,7 +1068,6 @@ get_line buffer.get_line(buffer, line)\nRetrieve the contents of a line.\nAlso r get_line_sel_end_position buffer.get_line_sel_end_position(buffer, line)\nRetrieve the position of the end of the selection at the given line (`-1` if\nno selection on this line).\n@param buffer The global buffer.\n@param line The line number. get_line_sel_start_position buffer.get_line_sel_start_position(buffer, line)\nRetrieve the position of the start of the selection at the given line (`-1`\nif no selection on this line).\n@param buffer The global buffer.\n@param line The line number. get_property lexer.get_property(key, default)\nReturns an integer property value for a given key.\n@param key The property key.\n@param default Optional integer value to return if key is not set.\n@return integer property value -get_range_pointer buffer.get_range_pointer(buffer, position, range_length)\nReturn a read-only pointer to a range of characters in the document.\nMay move the gap so that the range is contiguous, but will only move up to\nrange_length bytes.\nThe gap is not moved unless it is within the requested range so this call can\nbe faster than `buffer.character_pointer`. This can be used by application\ncode that is able to act on blocks of text or ranges of lines. get_sel_text buffer.get_sel_text(buffer)\nRetrieve the selected text.\nAlso returns the length of the text.\n@param buffer The global buffer.\n@return string, number get_split_table gui.get_split_table()\nGets the current split view structure.\nThis is primarily used in session saving.\n@return table of split views. Each split view entry is a table with 4\n fields: `1`, `2`, `vertical`, and `size`. `1` and `2` have values of either\n nested split view entries or the views themselves; `vertical` is a flag\n indicating if the split is vertical or not; and `size` is the integer\n position of the split resizer. get_style_at lexer.get_style_at(pos)\nReturns the string style name and style number at a given position.\n@param pos The position to get the style for.\n@return style name\n@return style number @@ -1126,7 +1125,7 @@ hypertext _G.snippets.hypertext (table)\nContainer for HTML-specific snippets. hypertext _M.hypertext (module)\nThe hypertext module.\nIt provides utilities for editing HTML code. iconv string.iconv(text, to, from)\nConverts a string from one character set to another using iconv.\nValid character sets are GNU iconv's character 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. in_files gui.find.in_files (bool)\nSearch for the text in a list of files. -in_files_label_text gui.find.in_files_label_text (string, Write-only)\nThe text of the 'In files' label.\nThis is primarily used for localization. +in_files_label_text gui.find.in_files_label_text (string, Write-only)\nThe text of the "In files" label.\nThis is primarily used for localization. indent buffer.indent (number)\nIhe number of spaces used for one level of indentation.\nFor a width of `0`, the indent size is the same as the tab size. indentation_guides buffer.indentation_guides (number)\nIndentation guides appearance.\nIndentation guides are dotted vertical lines that appear within indentation\nwhite space every indent size columns.\n\n* `_SCINTILLA.constants.SC_IV_NONE` (0)\n No indentation guides are shown.\n* `_SCINTILLA.constants.SC_IV_REAL` (1)\n Indentation guides are shown inside real indentation white space.\n* `_SCINTILLA.constants.SC_IV_LOOKFORWARD` (2)\n Indentation guides are shown beyond the actual indentation up to the\n level of the next non-empty line.\n If the previous non-empty line was a fold header then indentation guides\n are shown for one more level of indent than that line. This setting is\n good for Python.\n* `_SCINTILLA.constants.SC_IV_LOOKBOTH` (3)\n Indentation guides are shown beyond the actual indentation up to the\n level of the next non-empty line or previous non-empty line whichever is\n the greater.\n This setting is good for most languages. indic_alpha buffer.indic_alpha (table)\nTable of alpha transparency values ranging from `0` (transparent) to `255`\n(opaque) or `256` (no alpha) for indicators from `0` to `31`.\nUsed for drawing the fill color of the `INDIC_ROUNDBOX` and\n`INDIC_STRAIGHTBOX` rectangle. @@ -1226,7 +1225,7 @@ lua _G.keys.lua (table)\nContainer for Lua-specific key bindings. lua _G.snippets.lua (table)\nContainer for Lua-specific snippets. lua _M.lua (module)\nThe lua module.\nIt provides utilities for editing Lua code. lua gui.find.lua (bool)\nThe search text is interpreted as a Lua pattern. -lua_pattern_label_text gui.find.lua_pattern_label_text (string, Write-only)\nThe text of the 'Lua pattern' label.\nThis is primarily used for localization. +lua_pattern_label_text gui.find.lua_pattern_label_text (string, Write-only)\nThe text of the "Lua pattern" label.\nThis is primarily used for localization. main_selection buffer.main_selection (number)\nThe main selection.\nThe main selection may be displayed in different colors or with a\ndifferently styled caret. Only an already existing selection can be made\nmain. margin_cursor_n buffer.margin_cursor_n (table)\nTable of cursors shown for margins from zero to four.\nA reversed arrow cursor is normally shown over all margins.\n\n* `_SCINTILLA.constants.SC_CURSORARROW`\n Normal arrow.\n* `_SCINTILLA.constants.SC_CURSORREVERSEARROW`\n Reversed arrow. margin_left buffer.margin_left (number)\nThe size in pixels of the left margin.\nThe default is to one pixel. @@ -1262,7 +1261,7 @@ match lpeg.match(pattern, subject [, init])\nThe matching function. It attempts match string.match(s, pattern [, init])\nLooks for the first *match* of `pattern` in the string `s`. If it\nfinds one, then `match` returns the captures from the pattern; otherwise\nit returns nil. If `pattern` specifies no captures, then the whole match\nis returned. A third, optional numerical argument `init` specifies where\nto start the search; its default value is 1 and can be negative. match_brace _M.textadept.editing.match_brace(select)\nGoes to a matching brace position, selecting the text inside if specified to.\n@param select If `true`, selects the text between matching braces. match_case gui.find.match_case (bool)\nSearches are case-sensitive. -match_case_label_text gui.find.match_case_label_text (string, Write-only)\nThe text of the 'Match case' label.\nThis is primarily used for localization. +match_case_label_text gui.find.match_case_label_text (string, Write-only)\nThe text of the "Match case" label.\nThis is primarily used for localization. math _G.math (module)\nLua math module. max math.max(x, ···)\nReturns the maximum value among its arguments. max_line_state buffer.max_line_state (number, Read-only)\nThe last line number that has line state. @@ -1282,7 +1281,7 @@ move_selected_lines_down buffer.move_selected_lines_down(buffer)\nMove the selec move_selected_lines_up buffer.move_selected_lines_up(buffer)\nMove the selected lines up one line, shifting the line above after the\nselection.\nThe selection will be automatically extended to the beginning of the\nselection's first line and the end of the seletion's last line. If nothing\nwas selected, the line the cursor is currently at will be selected.\n@param buffer The global buffer. multi_paste buffer.multi_paste (bool)\nThe effect of pasting when there are multiple selections.\n\n* `_SCINTILLA.constants.SC_MULTIPASTE_ONCE` (0)\n Pasted text can go into just the main selection (default).\n* `_SCINTILLA.constants.SC_MULTIPASTE_EACH` (1)\n Pasted text can go into each selection. multiple_selection buffer.multiple_selection (bool)\nWhether multiple selections can be made.\nWhen multiple selection is disabled, it is not possible to select multiple\nranges by holding down the Ctrl key while dragging with the mouse. -nested_pair lexer.nested_pair(start_chars, end_chars, end_optional)\nSimilar to `delimited_range()`, but allows for multi-character, nested\ndelimiters.\nWith single-character delimiters, this function is identical to\n`delimited_range(start_chars..end_chars, nil, end_optional, true)`.\n@param start_chars The string starting a nested sequence.\n@param end_chars The string ending a nested sequence.\n@param end_optional Optional flag indicating whether or not an ending\n delimiter is optional or not. If `true`, the range begun by the start\n delimiter matches until an end delimiter or the end of the input is\n reached.\n@usage local nested_comment = l.nested_pair('/*', '*/', true)\n@return pattern +nested_pair lexer.nested_pair(start_chars, end_chars, end_optional)\nSimilar to `delimited_range()`, but allows for multi-character, nested\ndelimiters.\nWith single-character delimiters, this function is identical to\n`delimited_range(start_chars..end_chars, nil, end_optional, true)`.\n@param start_chars The string starting a nested sequence.\n@param end_chars The string ending a nested sequence.\n@param end_optional Optional flag indicating whether or not an ending\n delimiter is optional or not. If `true`, the range begun by the start\n delimiter matches until an end delimiter or the end of the input is\n reached.\n@usage local nested_comment = l.nested_pair('/*', '*/', true)\n@return pattern\n@see delimited_range new _M.textadept.adeptsense.new(lang)\nCreates a new Adeptsense for the given lexer language.\nOnly one sense can exist 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 new_buffer _G.new_buffer()\nCreates a new buffer.\nEmits a `BUFFER_NEW` event.\n@return the new buffer.\n@see events.BUFFER_NEW new_line buffer.new_line(buffer)\nInsert a new line, may use a CRLF, CR or LF depending on EOL mode.\n@param buffer The global buffer. @@ -1292,7 +1291,7 @@ next_indic_number _SCINTILLA.next_indic_number()\nReturns a unique indicator num next_marker_number _SCINTILLA.next_marker_number()\nReturns a unique marker number.\nUse this function for custom markers in order to prevent clashes with\nidentifiers of other custom markers.\n@usage local marknum = _SCINTILLA.next_marker_number()\n@see buffer.marker_define next_user_list_type _SCINTILLA.next_user_list_type()\nReturns a unique user list type.\nUse this function for custom user lists in order to prevent clashes with\nlist identifiers of other custom user lists.\n@usage local list_type = _SCINTILLA.next_user_list_type()\n@see buffer.user_list_show nonnewline lexer.nonnewline (pattern)\nMatches any non-newline character. -nonnewline_esc lexer.nonnewline_esc (pattern)\nMatches any non-newline character excluding newlines escaped with `\`. +nonnewline_esc lexer.nonnewline_esc (pattern)\nMatches any non-newline character excluding newlines escaped with '\'. oct_num lexer.oct_num (pattern)\nMatches an octal number. open _M.textadept.snapopen.open(utf8_paths, filter, exclude_PATHS, exclude_FILTER, depth)\nQuickly open files in set of directories using a filtered list dialog.\nThe number of files in the list is capped at `MAX`.\n@param utf8_paths A UTF-8 string directory path or table of UTF-8 directory\n paths to search.\n@param filter A filter for files and folders to exclude. The filter may be\n a string or table. Each filter is a Lua pattern. Any files matching a\n filter are excluded. Prefix a pattern with '!' to exclude any files that\n do not match a filter. File extensions can be more efficiently excluded by\n adding the extension text to a table assigned to an `extensions` key in the\n filter table instead of using individual filters. Directories can be\n excluded by adding filters to a table assigned to a `folders` key in the\n filter table. All strings should be UTF-8 encoded.\n@param exclude_PATHS Flag indicating whether or not to exclude `PATHS` in the\n search. The default value is `false`.\n@param exclude_FILTER Flag indicating whether or not to exclude `FILTER` from\n `filter` in the search. If false, adds `FILTER` to the given `filter`.\n The default value is `false`.\n@param depth Number of directories to recurse into for finding files.\n The default value is `DEFAULT_DEPTH`.\n@usage _M.textadept.snapopen.open() -- list all files in PATHS\n@usage _M.textadept.snapopen.open(buffer.filename:match('^.+/'), nil, true)\n -- list all files in the current file's directory\n@usage _M.textadept.snapopen.open(nil, '!%.lua$') -- list all Lua files in\n PATHS\n@usage _M.textadept.snapopen.open('/project', { folders = { 'secret' } },\n true) -- list all project files except those in a secret folder\n@see PATHS\n@see FILTER\n@see DEFAULT_DEPTH\n@see MAX open io.open(filename [, mode])\nThis function opens a file, in the mode specified in the string `mode`. It\nreturns a new file handle, or, in case of errors, nil plus an error message.\n\nThe `mode` string can be any of the following:\n "r": read mode (the default);\n "w": write mode;\n "a": append mode;\n "r+": update mode, all previous data is preserved;\n "w+": update mode, all previous data is erased;\n "a+": append update mode, previous data is preserved, writing is only\n allowed at the end of file.\n\nThe `mode` string can also have a '`b`' at the end, which is needed in\nsome systems to open the file in binary mode. @@ -1380,21 +1379,21 @@ remove table.remove(list [, pos])\nRemoves from `list` the element at position ` rename os.rename(oldname, newname)\nRenames file or directory named `oldname` to `newname`. If this function\nfails, it returns nil, plus a string describing the error and the error code. rep string.rep(s, n [, sep])\nReturns a string that is the concatenation of `n` copies of the string `s`\nseparated by the string `sep`. The default value for `sep` is the empty\nstring (that is, no separator). replace bit32.replace(n, v, field [, width])\nReturns a copy of `n` with the bits `field` to `field + width - 1` replaced\nby the value `v`. See `bit32.extract` for details about `field` and `width`. -replace gui.find.replace()\nMimicks a press of the 'Replace' button. -replace_all gui.find.replace_all()\nMimicks a press of the 'Replace All' button. -replace_all_button_text gui.find.replace_all_button_text (string, Write-only)\nThe text of the 'Replace All' button.\nThis is primarily used for localization. -replace_button_text gui.find.replace_button_text (string, Write-only)\nThe text of the 'Replace' button.\nThis is primarily used for localization. +replace gui.find.replace()\nMimicks a press of the "Replace" button. +replace_all gui.find.replace_all()\nMimicks a press of the "Replace All" button. +replace_all_button_text gui.find.replace_all_button_text (string, Write-only)\nThe text of the "Replace All" button.\nThis is primarily used for localization. +replace_button_text gui.find.replace_button_text (string, Write-only)\nThe text of the "Replace" button.\nThis is primarily used for localization. replace_entry_text gui.find.replace_entry_text (string)\nThe text in the replace entry. -replace_label_text gui.find.replace_label_text (string, Write-only)\nThe text of the 'Replace' label.\nThis is primarily used for localization. +replace_label_text gui.find.replace_label_text (string, Write-only)\nThe text of the "Replace" label.\nThis is primarily used for localization. replace_sel buffer.replace_sel(buffer, text)\nReplace the selected text with the argument text.\nThe caret is positioned after the inserted text and the caret is scrolled\ninto view.\n@param buffer The global buffer.\n@param text The text. replace_target buffer.replace_target(buffer, text)\nReplace the target text with the argument text.\nAfter replacement, the target range refers to the replacement text.\nReturns the length of the replacement text.\n@param buffer The global buffer.\n@param text The text (can contain NULs).\n@return number -replace_target_re buffer.replace_target_re(buffer, text)\nReplace the target text with the argument text after \d` processing.\nLooks for `\d` where `d` is between `1` and `9` and replaces these with the\nstrings matched in the last search operation which were surrounded by `\(`\nand `\)`. Returns the length of the replacement text including any change\ncaused by processing the `\d` patterns.\n@param buffer The global buffer.\n@param text The text (can contain NULs).\n@return number +replace_target_re buffer.replace_target_re(buffer, text)\nReplace the target text with the argument text after `\d` processing.\nLooks for `\d` where `d` is between `1` and `9` and replaces these with the\nstrings matched in the last search operation which were surrounded by `\(`\nand `\)`. Returns the length of the replacement text including any change\ncaused by processing the `\d` patterns.\n@param buffer The global buffer.\n@param text The text (can contain NULs).\n@return number require _G.require(modname)\nLoads the given module. The function starts by looking into the\n`package.loaded` table to determine whether `modname` is already\nloaded. If it is, then `require` returns the value stored at\n`package.loaded[modname]`. Otherwise, it tries to find a *loader* for\nthe module.\n\nTo find a loader, `require` is guided by the `package.searchers` sequence. By\nchanging this sequence, we can change how `require` looks for a module. The\nfollowing explanation is based on the default configuration for\n`package.searchers`.\n\nFirst `require` queries `package.preload[modname]`. If it has a value,\nthis value (which should be a function) is the loader. Otherwise `require`\nsearches for a Lua loader using the path stored in `package.path`. If\nthat also fails, it searches for a C loader using the path stored in\n`package.cpath`. If that also fails, it tries an *all-in-one* loader (see\n`package.searchers`).\n\nOnce a loader is found, `require` calls the loader with two arguments:\n`modname` and an extra value dependent on how it got the loader. (If the\nloader came from a file, this extra value is the file name.) If the loader\nreturns any non-nil value, `require` assigns the returned value to\n`package.loaded[modname]`. If the loader does not return a non-nil value and\nhas not assigned any value to `package.loaded[modname]`, then `require`\nassigns true to this entry. In any case, `require` returns the final\nvalue of `package.loaded[modname]`.\n\nIf there is any error loading or running the module, or if it cannot find\nany loader for the module, then `require` raises an error. reset _G.reset()\nResets the Lua state by reloading all init scripts.\nLanguage-specific modules for opened files are NOT reloaded. Re-opening the\nfiles that use them will reload those modules instead.\nThis function is useful for modifying user scripts (such as\n*~/.textadept/init.lua* and *~/.textadept/modules/textadept/keys.lua*) on\nthe fly without having to restart Textadept. `_G.RESETTING` is set to `true`\nwhen re-initing the Lua State. Any scripts that need to differentiate between\nstartup and reset can utilize this variable.\n@see RESETTING resume coroutine.resume(co [, val1, ···])\nStarts or continues the execution of coroutine `co`. The first time\nyou resume a coroutine, it starts running its body. The values `val1`,\n... are passed as the arguments to the body function. If the coroutine\nhas yielded, `resume` restarts it; the values `val1`, ... are passed\nas the results from the yield.\n\nIf the coroutine runs without any errors, `resume` returns true plus any\nvalues 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. reverse string.reverse(s)\nReturns a string that is the string `s` reversed. rgba_image_height buffer.rgba_image_height (number)\nThe height for future RGBA image data. -rgba_image_scale buffer.rgba_image_scale (number)\nThe scale factor in percent for future RGBA image data.\nThis is useful on OSX with a retina display where each display unit is 2\npixels: use a factor of 200 so that each image pixel is dsplayed using a\nscreen pixel. The default scale, 100, will stretch each image pixel to\ncover 4 screen pixels on a retina display. +rgba_image_scale buffer.rgba_image_scale (number)\nThe scale factor in percent for future RGBA image data.\nThis is useful on OSX with a retina display where each display unit is 2\npixels: use a factor of `200` so that each image pixel is dsplayed using a\nscreen pixel. The default scale, `100`, will stretch each image pixel to\ncover 4 screen pixels on a retina display. rgba_image_width buffer.rgba_image_width (number)\nThe width for future RGBA image data. rhtml _G.keys.rhtml (table)\nContainer for RHTML-specific key bindings. rhtml _G.snippets.rhtml (table)\nContainer for RHTML-specific snippets. @@ -1420,7 +1419,7 @@ scroll_to_start buffer.scroll_to_start(buffer)\nScroll to start of document.\n@p scroll_width buffer.scroll_width (number)\nThe document width assumed for scrolling.\nFor performance, the view does not measure the display width of the\ndocument to determine the properties of the horizontal scroll bar. Instead,\nan assumed width is used. The default value is `2000`. To ensure the width\nof the currently visible lines can be scrolled use\n`buffer.scroll_width_tracking`. scroll_width_tracking buffer.scroll_width_tracking (bool)\nWhether the maximum width line displayed is used to set scroll width. search_anchor buffer.search_anchor(buffer)\nSets the current caret position to be the search anchor.\nAlways call this before calling either of `buffer:search_next()` or\n`buffer:search_prev()`.\n@param buffer The global buffer. -search_flags buffer.search_flags (number)\nThe search flags used by `buffer:search_in_target()`.\n\n* `_SCINTILLA.constants.SCFIND_WHOLEWORD` (2)\n A match only occurs with text that matches the case of the search string.\n* `_SCINTILLA.constants.SCFIND_MATCHCASE` (4)\n A match only occurs if the characters before and after are not word\n characters.\n* `_SCINTILLA.constants.SCFIND_WORDSTART` (0x00100000)\n A match only occurs if the character before is not a word character.\n* `_SCINTILLA.constants.SCFIND_REGEXP` (0x00200000)\n The search string should be interpreted as a regular expression.\n* `_SCINTILLA.constants.SCFIND_POSIX` (0x00400000)\n Treat regular expression in a more POSIX compatible manner by\n interpreting bare '(' and ')' for tagged sections rather than "\(" and\n "\)". +search_flags buffer.search_flags (number)\nThe search flags used by `buffer:search_in_target()`.\n\n* `_SCINTILLA.constants.SCFIND_WHOLEWORD` (2)\n A match only occurs with text that matches the case of the search string.\n* `_SCINTILLA.constants.SCFIND_MATCHCASE` (4)\n A match only occurs if the characters before and after are not word\n characters.\n* `_SCINTILLA.constants.SCFIND_WORDSTART` (0x00100000)\n A match only occurs if the character before is not a word character.\n* `_SCINTILLA.constants.SCFIND_REGEXP` (0x00200000)\n The search string should be interpreted as a regular expression.\n* `_SCINTILLA.constants.SCFIND_POSIX` (0x00400000)\n Treat regular expression in a more POSIX compatible manner by\n interpreting bare '(' and ')' for tagged sections rather than "\\(" and\n "\\)". search_in_target buffer.search_in_target(buffer, text)\nSearch for a counted string in the target and set the target to the found\nrange.\nReturns length of range or `-1` for failure in which case target is not\nmoved.\n@param buffer The global buffer.\n@param text The text (can contain NULs).\n@return number search_next buffer.search_next(buffer, flags, text)\nFind some text starting at the search anchor.\nThe return value is `-1` if nothing is found, otherwise the return value is\nthe start position of the matching text. The selection is updated to show the\nmatched text, but is not scrolled into view.\n@param buffer The global buffer.\n@param flags Search flags. See `buffer.search_flags`.\n@param text The text.\n@return number search_prev buffer.search_prev(buffer, flags, text)\nFind some text starting at the search anchor and moving backwards.\nThe return value is `-1` if nothing is found, otherwise the return value is\nthe start position of the matching text. The selection is updated to show the\nmatched text, but is not scrolled into view.\n@param buffer The global buffer.\n@param flags Search flags. See `buffer.search_flags`.\n@param text The text.\n@return number @@ -1490,7 +1489,7 @@ set_sel_fore buffer.set_sel_fore(buffer, use_setting, color)\nSet the foreground set_selection buffer.set_selection(buffer, caret, anchor)\nSet a simple selection from anchor to caret.\n@param buffer The global buffer.\n@param caret The caret.\n@param anchor The anchor. set_styling buffer.set_styling(buffer, length, style)\nChange style from current styling position for length characters to a style\nand move the current styling position to after this newly styled segment.\n@param buffer The global buffer.\n@param length The length to style.\n@param style The style number to set. set_text buffer.set_text(buffer, text)\nReplace the contents of the document with the argument text.\n@param buffer The global buffer.\n@param text The text. -set_theme gui.set_theme(name)\nSets the editor theme from the given name.\nThemes with the given name in the *`_USERHOME`/themes/* directory override\nthemes of the same name in *`_HOME`/themes/*. If the name contains slashes\n('\' on Windows, '/' otherwise), it is assumed to be an absolute path to a\ntheme instead of a theme name. An error is thrown if the theme is not found.\nAny errors in the theme are printed to `io.stderr`.\n@param name The name or absolute path of a theme. If nil, sets the default\n theme. +set_theme gui.set_theme(name)\nSets the editor theme from the given name.\nThemes with the given name in the *`_USERHOME`/themes/* directory override\nthemes of the same name in *`_HOME`/themes/*. If the name contains slashes\n('\' on Windows, '/' otherwise), it is assumed to be an absolute path to a\ntheme instead of a theme name. An error is thrown if the theme is not found.\nAny errors in the theme are printed to `io.stderr`. Running Textadept from a\nterminal is the easiest way to see errors as they occur.\n@param name The name or absolute path of a theme. If `nil`, sets the default\n theme. set_visible_policy buffer.set_visible_policy(buffer, visible_policy, visible_slop)\nSet the way the display area is determined when a particular line is to be\nmoved to by `buffer:goto_line()`, etc.\nIt is similar in operation to `buffer:set_y_caret_policy()`.\n@param buffer The global buffer.\n@param visible_policy A combination of `_SCINTILLA.constants.VISIBLE_SLOP`,\n (0x01) and `_SCINTILLA.constants.VISIBLE_STRICT` (0x04).\n@param visible_slop The slop value. set_whitespace_back buffer.set_whitespace_back(buffer, use_setting, color)\nSet the background color of all whitespace and whether to use this setting.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in "0xBBGGRR" format. set_whitespace_fore buffer.set_whitespace_fore(buffer, use_setting, color)\nSet the foreground color of all whitespace and whether to use this setting.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in "0xBBGGRR" format. @@ -1657,7 +1656,7 @@ visible_from_doc_line buffer.visible_from_doc_line(buffer, line)\nFind the displ whitespace_chars buffer.whitespace_chars (string)\nThe set of characters making up whitespace for when moving or selecting by\nword.\nUse after setting `buffer.word_chars`. whitespace_size buffer.whitespace_size (number)\nThe size of the dots used to mark space characters. whole_word gui.find.whole_word (bool)\nOnly whole-word matches are allowed in searches. -whole_word_label_text gui.find.whole_word_label_text (string, Write-only)\nThe text of the 'Whole word' label.\nThis is primarily used for localization. +whole_word_label_text gui.find.whole_word_label_text (string, Write-only)\nThe text of the "Whole word" label.\nThis is primarily used for localization. word lexer.word (pattern)\nMatches a typical word starting with a letter or underscore and then any\nalphanumeric or underscore characters. word_chars _M.textadept.adeptsense.syntax.word_chars (table)\nA Lua pattern of characters allowed in a word.\n The default is `'%w_'`. word_chars buffer.word_chars (string)\nThe set of characters making up words when moving or selecting by word. @@ -1666,7 +1665,7 @@ word_left buffer.word_left(buffer)\nMove caret left one word.\n@param buffer The word_left_end buffer.word_left_end(buffer)\nMove caret left one word, position cursor at end of word.\n@param buffer The global buffer. word_left_end_extend buffer.word_left_end_extend(buffer)\nMove caret left one word, position cursor at end of word, extending selection\nto new caret position.\n@param buffer The global buffer. word_left_extend buffer.word_left_extend(buffer)\nMove caret left one word extending selection to new caret position.\n@param buffer The global buffer. -word_match lexer.word_match(words, word_chars, case_insensitive)\nCreates and returns a pattern that matches any word in the given set of\nwords.\nThis is a convenience function for simplifying a set of ordered choice word\npatterns.\n@param words A table of words.\n@param word_chars Optional string of additional characters considered to be\n part of a word. By default, word characters are alphanumerics and\n underscores (`%w_` in Lua). This parameter may be `nil` or the empty string\n to indicate no additional word characters.\n@param case_insensitive Optional boolean flag indicating whether or not the\n word match is case-insensitive. The default is `false`.\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@return pattern +word_match lexer.word_match(words, word_chars, case_insensitive)\nCreates and returns a pattern that matches any word in the given set of\nwords.\nThis is a convenience function for simplifying a set of ordered choice word\npatterns.\n@param words A table of words.\n@param word_chars Optional string of additional characters considered to be\n part of a word. By default, word characters are alphanumerics and\n underscores ("%w_" in Lua). This parameter may be `nil` or the empty string\n to indicate no additional word characters.\n@param case_insensitive Optional boolean flag indicating whether or not the\n word match is case-insensitive. The default is `false`.\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@return pattern word_part_left buffer.word_part_left(buffer)\nMove to the previous change in capitalisation or underscores.\n@param buffer The global buffer. word_part_left_extend buffer.word_part_left_extend(buffer)\nMove to the previous change in capitalisation or underscores extending\nselection to new caret position.\n@param buffer The global buffer. word_part_right buffer.word_part_right(buffer)\nMove to the next change in capitalisation or underscores.\n@param buffer The global buffer. diff --git a/modules/lua/tags b/modules/lua/tags index a38ed664..be60c0a0 100644 --- a/modules/lua/tags +++ b/modules/lua/tags @@ -1099,7 +1099,6 @@ get_line _ 0;" f class:buffer get_line_sel_end_position _ 0;" f class:buffer get_line_sel_start_position _ 0;" f class:buffer get_property _ 0;" f class:lexer -get_range_pointer _ 0;" f class:buffer get_sel_text _ 0;" f class:buffer get_split_table _ 0;" f class:gui get_style_at _ 0;" f class:lexer diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index d61ad7dc..b5887555 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -60,7 +60,7 @@ M.comment_string = {} -- Used for auto-matching parentheses, brackets, braces, quotes, etc. Keys are -- lexer language names and values are tables of character match pairs. A pair's -- key is an ASCII value and the value is the string character match. The --- defaults are "()", "[]", "{}", "''", and """". +-- defaults are "()", "[]", "{}", "''", and """". -- This table can be populated by language-specific modules. -- @class table -- @name char_matches diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 8035b5e6..dee2244b 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -18,34 +18,34 @@ local find = gui.find -- @field in_files (bool) -- Search for the text in a list of files. -- @field find_label_text (string, Write-only) --- The text of the 'Find' label. +-- The text of the "Find" label. -- This is primarily used for localization. -- @field replace_label_text (string, Write-only) --- The text of the 'Replace' label. +-- The text of the "Replace" label. -- This is primarily used for localization. -- @field find_next_button_text (string, Write-only) --- The text of the 'Find Next' button. +-- The text of the "Find Next" button. -- This is primarily used for localization. -- @field find_prev_button_text (string, Write-only) --- The text of the 'Find Prev' button. +-- The text of the "Find Prev" button. -- This is primarily used for localization. -- @field replace_button_text (string, Write-only) --- The text of the 'Replace' button. +-- The text of the "Replace" button. -- This is primarily used for localization. -- @field replace_all_button_text (string, Write-only) --- The text of the 'Replace All' button. +-- The text of the "Replace All" button. -- This is primarily used for localization. -- @field match_case_label_text (string, Write-only) --- The text of the 'Match case' label. +-- The text of the "Match case" label. -- This is primarily used for localization. -- @field whole_word_label_text (string, Write-only) --- The text of the 'Whole word' label. +-- The text of the "Whole word" label. -- This is primarily used for localization. -- @field lua_pattern_label_text (string, Write-only) --- The text of the 'Lua pattern' label. +-- The text of the "Lua pattern" label. -- This is primarily used for localization. -- @field in_files_label_text (string, Write-only) --- The text of the 'In files' label. +-- The text of the "In files" label. -- This is primarily used for localization. -- @field _G.events.FIND_WRAPPED (string) -- Called when a search for text wraps, either from bottom to top when @@ -253,7 +253,7 @@ events_connect(events.COMMAND_ENTRY_KEYPRESS, function(code) end end, 1) -- place before command_entry.lua's handler (if necessary) --- 'Find next' for incremental search. +-- "Find next" for incremental search. events_connect(events.COMMAND_ENTRY_COMMAND, function(text) if find.incremental then find.incremental_start = buffer.current_pos + 1 @@ -286,7 +286,7 @@ end -- Replaces found text. -- `find_()` is called first, to select any found text. The selected text is -- then replaced by the specified replacement text. --- This function ignores 'Find in Files'. +-- This function ignores "Find in Files". -- @param rtext The text to replace found text with. It can contain both Lua -- capture items (`%n` where 1 <= `n` <= 9) for Lua pattern searches and `%()` -- sequences for embedding Lua code for any search. @@ -318,7 +318,7 @@ events_connect(events.REPLACE, replace) -- Replaces all found text. -- If any text is selected, all found text in that selection is replaced. --- This function ignores 'Find in Files'. +-- This function ignores "Find in Files". -- @param ftext The text to find. -- @param rtext The text to replace found text with. -- @param flags The number mask identical to the one in `find_()`. @@ -428,25 +428,25 @@ end) local focus --- --- Mimicks a press of the 'Find Next' button. +-- Mimicks a press of the "Find Next" button. -- @class function -- @name find_next local find_next --- --- Mimicks a press of the 'Find Prev' button. +-- Mimicks a press of the "Find Prev" button. -- @class function -- @name find_prev local find_prev --- --- Mimicks a press of the 'Replace' button. +-- Mimicks a press of the "Replace" button. -- @class function -- @name replace local replace --- --- Mimicks a press of the 'Replace All' button. +-- Mimicks a press of the "Replace All" button. -- @class function -- @name replace_all local replace_all -- cgit v1.2.3