diff options
Diffstat (limited to 'modules/lua')
-rw-r--r-- | modules/lua/api | 16 | ||||
-rw-r--r-- | modules/lua/tags | 4 |
2 files changed, 14 insertions, 6 deletions
diff --git a/modules/lua/api b/modules/lua/api index 2b79d70e..e96a0f48 100644 --- a/modules/lua/api +++ b/modules/lua/api @@ -703,6 +703,7 @@ insert_text buffer.insert_text(buffer, pos, text)\nInserts string *text* at posi integer lexer.integer (pattern)\nA pattern that matches either a decimal, hexadecimal, or octal number. io _G.io (module)\nLua io module. ipairs _G.ipairs(t)\nReturns three values (an iterator function, the table `t`, and 0) so that the\nconstruction\n\n for i,v in ipairs(t) do *body* end\n\nwill iterate over the key-value pairs (`1,t[1]`), (`2,t[2]`), ยทยทยท, up to the\nfirst nil value. +is_range_word buffer.is_range_word(buffer, start_pos, end_pos)\nReturns whether or not the the positions *start_pos* and *end_pos* are at\nword boundaries.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to\n check for a word boundary at.\n@param end_pos The end position of the range of text in *buffer* to check for\n a word boundary at. isyieldable coroutine.isyieldable()\nReturns true when the running coroutine can yield.\n\nA running coroutine is yieldable if it is not the main thread and it is not\ninside a non-yieldable C function.\n\nNew in Lua 5.3. join_lines textadept.editing.join_lines()\nJoins the currently selected lines or the current line with the line below\nit.\nAs long as any part of a line is selected, the entire line is eligible for\njoining. keychain keys.keychain (table)\nThe current chain of key sequences. (Read-only.) @@ -710,7 +711,7 @@ keys _G.keys (module)\nManages key bindings in Textadept. keys _G.keys (table)\nMap of key bindings to commands, with language-specific key tables assigned\nto a lexer name key. keys textadept.keys (module)\nDefines key commands for Textadept.\nThis set of key commands is pretty standard among other text editors. If\napplicable, load this module second to last in your *~/.textadept/init.lua*,\nbefore `textadept.menu`. kill spawn_proc:kill(signal)\nKills running process *spawn_proc*, or sends it Unix signal *signal*.\n@param signal Optional Unix signal to send to *spawn_proc*. The default value\n is 9 (`SIGKILL`), which kills the process. -last_char_includes lexer.last_char_includes(s)\nCreates and returns a pattern that verifies that string set *s* contains the\nfirst non-whitespace character behind the current match position.\n@param s String character set like one passed to `lpeg.S()`.\n@usage local regex = l.last_char_includes('+-*!%^&|=,([{') *\n l.delimited_range('/')\n@return pattern +last_char_includes lexer.last_char_includes(s)\nCreates and returns a pattern that verifies that string set *s* contains the\nfirst non-whitespace character behind the current match position.\n@param s String character set like one passed to `lpeg.S()`.\n@usage local regex = #P('/') * l.last_char_includes('+-*!%^&|=,([{') *\n l.delimited_range('/')\n@return pattern ldexp math.ldexp(m, e)\nReturns 'm2^e' (`e` should be an integer).\n\nDeprecated in Lua 5.3. len string.len(s)\nReceives a string and returns its length. The empty string `""` has\nlength 0. Embedded zeros are counted, so `"a\000bc\000"` has length 5. len utf8.len(s [, i [, j]])\nReturns the number of UTF-8 characters in string `s` that start between\npositions `i` and `j` (both inclusive). The default for `i` is 1 and for `j`\nis -1. If it finds any invalid byte sequence, returns a false value plus the\nposition of the first invalid byte.\n\nNew in Lua 5.3. @@ -835,6 +836,8 @@ move_selected_lines_down buffer.move_selected_lines_down(buffer)\nShifts the sel move_selected_lines_up buffer.move_selected_lines_up(buffer)\nShifts the selected lines up one line.\n@param buffer A buffer. msgbox ui.dialogs.msgbox(options)\nPrompts the user with a generic message box dialog defined by dialog options\ntable *options*, returning the selected button's index.\nIf *options*.`string_output` is `true`, returns the selected button's label.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the message box.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `informative_text`: The dialog's extra informative text.\n * `icon`: The dialog's GTK stock icon name. Examples are\n "gtk-dialog-error", "gtk-dialog-info", "gtk-dialog-question", and\n "gtk-dialog-warning". The dialog does not display an icon by default.\n * `icon_file`: The dialog's icon file path. This option has no effect when\n `icon` is set.\n * `button1`: The right-most button's label. The default value is\n `_L['_OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2`\n to be set.\n * `string_output`: Return the selected button's label (instead of its\n index) or the dialog's exit status instead of the button's index (instead\n of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.msgbox{title = 'EOL Mode', text = 'Which EOL?',\n icon = 'gtk-dialog-question', button1 = 'CRLF', button2 = 'CR',\n button3 = 'LF'}\n@return selected button or exit code multi_paste buffer.multi_paste (number)\nThe multiple selection paste mode.\n\n* `buffer.MULTIPASTE_ONCE`\n Paste into only the main selection.\n* `buffer.MULTIPASTE_EACH`\n Paste into all selections.\n\nThe default value is `buffer.MULTIPASTE_ONCE`. +multiple_select_add_each buffer.multiple_select_add_each(buffer)\nAdds to the set of selections each occurrence of the main selection within\nthe target range.\nIf there is no selected text, the current word is used.\n@param buffer A buffer. +multiple_select_add_next buffer.multiple_select_add_next(buffer)\nAdds to the set of selections the next occurrence of the main selection\nwithin the target range, makes that occurrence the new main selection, and\nscrolls it into view.\nIf there is no selected text, the current word is used.\n@param buffer A buffer. multiple_selection buffer.multiple_selection (bool)\nEnable multiple selection.\nThe default value is `false`. nested_pair lexer.nested_pair(start_chars, end_chars)\nReturns a pattern that matches a balanced range of text that starts with\nstring *start_chars* and ends with string *end_chars*.\nWith single-character delimiters, this function is identical to\n`delimited_range(start_chars..end_chars, false, true, true)`.\n@param start_chars The string starting a nested sequence.\n@param end_chars The string ending a nested sequence.\n@usage local nested_comment = l.nested_pair('/*', '*/')\n@return pattern\n@see delimited_range new buffer.new()\nCreates and returns a new buffer.\nEmits a `BUFFER_NEW` event.\n@return the new buffer.\n@see events.BUFFER_NEW @@ -990,7 +993,7 @@ select_enclosed textadept.editing.select_enclosed(left, right)\nSelects the text select_lexer textadept.file_types.select_lexer()\nPrompts the user to select a lexer for the current buffer.\n@see buffer.set_lexer select_line textadept.editing.select_line()\nSelects the current line. select_paragraph textadept.editing.select_paragraph()\nSelects the current paragraph.\nParagraphs are surrounded by one or more blank lines. -select_word textadept.editing.select_word()\nSelects the current word.\nIf already selected, selects the next occurrence as a multiple selection.\n@see buffer.word_chars +select_word textadept.editing.select_word(all)\nSelects the current word or, if *all* is `true`, all occurrences of the\ncurrent word.\nIf a word is already selected, selects the next occurrence as a multiple\nselection.\n@param all Whether or not to select all occurrences of the current word.\n The default value is `false`.\n@see buffer.word_chars selection_duplicate buffer.selection_duplicate(buffer)\nDuplicates the selected text to its right.\nIf no text is selected, duplicates the current line on a new line below.\n@param buffer A buffer. selection_empty buffer.selection_empty (bool, Read-only)\nWhether or not no text is selected. selection_end buffer.selection_end (number)\nThe position of the end of the selected text.\nWhen set, becomes the current position, but is not scrolled into view. @@ -1003,7 +1006,7 @@ selection_n_caret_virtual_space buffer.selection_n_caret_virtual_space (table)\n selection_n_end buffer.selection_n_end (table)\nTable of positions at the end of existing selections numbered from zero,\nthe main selection. selection_n_start buffer.selection_n_start (table)\nTable of positions at the beginning of existing selections numbered from\nzero, the main selection. selection_start buffer.selection_start (number)\nThe position of the beginning of the selected text.\nWhen set, becomes the anchor, but is not scrolled into view. -selections buffer.selections (number, Read-only)\nThe number of active selections. +selections buffer.selections (number, Read-only)\nThe number of active selections. There is always at least one selection. session textadept.session (module)\nSession support for Textadept. set_chars_default buffer.set_chars_default(buffer)\nResets `buffer.word_chars`, `buffer.whitespace_chars`, and\n`buffer.punctuation_chars` to their respective defaults.\n@param buffer A buffer.\n@see word_chars\n@see whitespace_chars\n@see punctuation_chars set_empty_selection buffer.set_empty_selection(buffer, pos)\nMoves the caret to position *pos* without scrolling the view and removes any\nselections.\n@param buffer A buffer\n@param pos The position in *buffer* to move to. @@ -1016,7 +1019,7 @@ set_sel buffer.set_sel(buffer, start_pos, end_pos)\nSelects the range of text be set_sel_back buffer.set_sel_back(buffer, use_setting, color)\nOverrides the selection's default background color with color *color*, in\n"0xBBGGRR" format, if *use_setting* is `true`.\nOverwrites any existing `buffer.additional_sel_back` color.\n@param buffer A buffer.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format. set_sel_fore buffer.set_sel_fore(buffer, use_setting, color)\nOverrides the selection's default foreground color with color *color*, in\n"0xBBGGRR" format, if *use_setting* is `true`.\nOverwrites any existing `buffer.additional_sel_fore` color.\n@param buffer A buffer.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format. set_selection buffer.set_selection(buffer, end_pos, start_pos)\nSelects the range of text between positions *start_pos* to *end_pos*,\nremoving all other selections.\n@param buffer A buffer.\n@param end_pos The caret position of the range of text to select in *buffer*.\n@param start_pos The anchor position of the range of text to select in\n *buffer*. -set_styling buffer.set_styling(buffer, length, style)\nAssigns style number *style*, in the range from `0` to `255`, to the next\n*length* characters, starting from the current styling position, and\nincrements the styling position by *length*.\n@param buffer A buffer.\n@param length The number of characters to style.\n@param style The style number to set. +set_styling buffer.set_styling(buffer, length, style)\nAssigns style number *style*, in the range from `0` to `255`, to the next\n*length* characters, starting from the current styling position, and\nincrements the styling position by *length*.\n`buffer:start_styling` should be called before `buffer:set_styling()`.\n@param buffer A buffer.\n@param length The number of characters to style.\n@param style The style number to set. set_target_range buffer.set_target_range(buffer, start_pos, end_pos)\nDefines the target range's beginning and end positions as *start_pos* and\n*end_pos*, respectively.\n@param buffer A buffer.\n@param start_pos The position of the beginning of the target range.\n@param end_pos The position of the end of the target range. set_text buffer.set_text(buffer, text)\nReplaces the buffer's text with string *text*.\n@param buffer A buffer.\n@param text The text to set. set_theme ui.set_theme(name, props)\nSwitches the editor theme to string *name* and (optionally) assigns the\nproperties contained in table *props*.\nUser themes override Textadept's default themes when they have the same name.\nIf *name* contains slashes, it is assumed to be an absolute path to a theme\ninstead of a theme name.\n@param name The name or absolute path of a theme to set.\n@param props Optional table of theme property assignments that override the\n theme's defaults.\n@usage ui.set_theme('light', {font = 'Monospace', fontsize = 12}) @@ -1108,6 +1111,7 @@ target_end buffer.target_end (number)\nThe position of the end of the target ran target_from_selection buffer.target_from_selection(buffer)\nDefines the target range's beginning and end positions as the beginning and\nend positions of the main selection, respectively.\n@param buffer A buffer. target_start buffer.target_start (number)\nThe position of the beginning of the target range.\nThis is also set by a successful `buffer.search_in_target()`. target_text buffer.target_text (string, Read-only)\nThe text in the target range. +target_whole_document buffer.target_whole_document(buffer)\nDefines the target range's beginning and end positions as the beginning and\nend positions of the document, respectively.\n@param buffer A buffer. text_height buffer.text_height(buffer, line)\nReturns the pixel height of line number *line*.\n@param buffer A buffer.\n@param line The line number in *buffer* to get the pixel height of.\n@return number text_length buffer.text_length (number, Read-only)\nThe number of bytes in the buffer. text_range buffer.text_range(buffer, start_pos, end_pos)\nReturns the range of text between positions *start_pos* and *end_pos*.\n@param buffer A buffer.\n@param start_pos The start position of the range of text to get in *buffer*.\n@param end_pos The end position of the range of text to get in *buffer*. @@ -1155,11 +1159,11 @@ user_list_show buffer.user_list_show(buffer, id, items)\nDisplays a user list id utf8 _G.utf8 (module)\nLua utf8 module. v_scroll_bar buffer.v_scroll_bar (bool)\nDisplay the vertical scroll bar.\nThe default value is `true`. vc_home buffer.vc_home(buffer)\nMoves the caret to the first visible character on the current line or, if\nalready there, to the beginning of the current line.\n@param buffer A buffer. -vc_home_display buffer.vc_home_display(buffer)\nMoves the caret to the first visible character on the current wrapped line,\nor if already there, to the beginning of the current wrapped line.\n@param buffer A buffer. +vc_home_display buffer.vc_home_display(buffer)\nMoves the caret to the first visible character on the current wrapped line\nor, if already there, to the beginning of the current wrapped line.\n@param buffer A buffer. vc_home_display_extend buffer.vc_home_display_extend(buffer)\nLike `buffer.vc_home_display()`, but extends the selected text to the new\nposition.\n@param buffer A buffer. vc_home_extend buffer.vc_home_extend(buffer)\nLike `buffer.vc_home()`, but extends the selected text to the new position.\n@param buffer A buffer. vc_home_rect_extend buffer.vc_home_rect_extend(buffer)\nLike `buffer.vc_home()`, but extends the rectangular selection to the new\nposition.\n@param buffer A buffer. -vc_home_wrap buffer.vc_home_wrap(buffer)\nMoves the caret to the first visible character on the current wrapped line,\nor if already there, to the beginning of the actual line.\n@param buffer A buffer. +vc_home_wrap buffer.vc_home_wrap(buffer)\nMoves the caret to the first visible character on the current wrapped line\nor, if already there, to the beginning of the actual line.\n@param buffer A buffer. vc_home_wrap_extend buffer.vc_home_wrap_extend(buffer)\nLike `buffer.vc_home_wrap()`, but extends the selected text to the new\nposition.\n@param buffer A buffer. version lpeg.version()\nReturns a string with the running version of LPeg. vertical_centre_caret buffer.vertical_centre_caret(buffer)\nCenters current line in the view.\n@param buffer A buffer. diff --git a/modules/lua/tags b/modules/lua/tags index 4d6ce267..38165ed9 100644 --- a/modules/lua/tags +++ b/modules/lua/tags @@ -711,6 +711,7 @@ insert_text _ 0;" f class:buffer integer _ 0;" F class:lexer io _ 0;" m ipairs _ 0;" f +is_range_word _ 0;" f class:buffer isyieldable _ 0;" f class:coroutine join_lines _ 0;" f class:textadept.editing keychain _ 0;" t class:keys @@ -843,6 +844,8 @@ move_selected_lines_down _ 0;" f class:buffer move_selected_lines_up _ 0;" f class:buffer msgbox _ 0;" f class:ui.dialogs multi_paste _ 0;" F class:buffer +multiple_select_add_each _ 0;" f class:buffer +multiple_select_add_next _ 0;" f class:buffer multiple_selection _ 0;" F class:buffer nested_pair _ 0;" f class:lexer new _ 0;" f class:buffer @@ -1116,6 +1119,7 @@ target_end _ 0;" F class:buffer target_from_selection _ 0;" f class:buffer target_start _ 0;" F class:buffer target_text _ 0;" F class:buffer +target_whole_document _ 0;" f class:buffer text_height _ 0;" f class:buffer text_length _ 0;" F class:buffer text_range _ 0;" f class:buffer |