summaryrefslogtreecommitdiffstats
path: root/pairs.lua
Commit message (Collapse)AuthorAgeFilesLines
* Export range functions directlyGeorgi Kirilov2023-10-041-0/+2
| | | | Useful for getting the range without changing the editing mode.
* XML tag blocks everywhere, HTML where appropriateGeorgi Kirilov2023-10-041-1/+7
|
* Exclusive inner textobjects in VISUAL_LINEGeorgi Kirilov2023-10-041-1/+20
| | | | | | First/last lines of a block are not included in the selection, if they have only trailing whitespace after the opening, and only leading whitespace before the closing, delimiter.
* Explicit Window argumentGeorgi Kirilov2023-10-041-27/+27
|
* More DRYGeorgi Kirilov2023-10-041-6/+6
|
* More intuitive order of argumentsGeorgi Kirilov2023-10-041-4/+4
|
* DRY fixesGeorgi Kirilov2023-10-041-6/+6
|
* Load the whole file only once per actionGeorgi Kirilov2023-10-041-44/+49
|
* Remove a constant argumentGeorgi Kirilov2023-10-041-4/+4
|
* Don't scan for comments/strings past the cursorGeorgi Kirilov2023-10-041-6/+22
|
* Use lpeg.Cc() instead of lpeg.Carg()Georgi Kirilov2023-10-041-11/+11
| | | | `pos` doesn't change across lpeg.match() invocations.
* U+FFFD in UTF-8Georgi Kirilov2023-10-041-3/+3
|
* Clearer reference to the Unicode replacement characterGeorgi Kirilov2023-10-041-3/+3
|
* Remove unnecessary lpeg.C() callsGeorgi Kirilov2023-10-041-2/+2
|
* Separate HTML and XML tag blocksGeorgi Kirilov2023-10-041-3/+10
| | | | | * Case-insensitive HTML tags * Accept some self-closing HTML tags without slash
* Faster failingGeorgi Kirilov2023-10-041-1/+5
| | | | Don't scan for top-level blocks past the cursor position.
* Replace a constant upvalue with an argument captureGeorgi Kirilov2023-10-041-6/+7
|
* Faster scanningGeorgi Kirilov2023-10-041-11/+19
| | | | | | | | | Skip balanced top-level blocks not containing the cursor position, instead of stepping over each character (or escaped region) and matching possible nested sub-blocks again. (60+ times faster in the worst-case scenario - cursor at end of file, preceded by deeply nested blocks.)
* Fix selection of wrong blockGeorgi Kirilov2023-10-041-2/+2
| | | | When the initial escaping context was wrong due to insufficient horizon.
* Keep comments/strings/code boundariesGeorgi Kirilov2023-10-041-7/+69
| | | | (Uses language-specific escaping rules)
* Remove the universal text object for quotesGeorgi Kirilov2023-10-041-3/+1
| | | | Better not introduce new mappings to memorize.
* Revert "Repeatedly calling block objects extends selection"Georgi Kirilov2023-10-041-20/+0
| | | | This reverts commit 6a7c70dbbb438e20f6347f77e084e13db3065c21.
* Fix outer object when cursor is on its last charGeorgi Kirilov2023-10-041-1/+1
| | | | | It skipped right to the parent object without first selecting the current one.
* Fix count handling (hopefully, for the last time)Georgi Kirilov2023-10-041-10/+18
|
* Exclusive motions in visualGeorgi Kirilov2023-10-041-2/+3
| | | | | | | | | | | | | In normal mode, when the cursor is past the inner side of a long delimiter, the pairwise motion goes in reverse, to recover to a "good" position. In visual mode, it is convenient to go one character further and get the selection to the boundary of the inner object. For example, if I did `vit` and, by mistake, extended the selection either with `at` or a motion, ]to[t will get me back to a selection of the `it`.
* Repeatedly calling block objects extends selectionGeorgi Kirilov2023-10-041-0/+20
| | | | | | | | | | | | | With vis' built-in block objects, one must move the cursor out of the current block to make it possible to extend the selection to the parent block. In normal mode dibdib can't break out of the empty first ib to delete the parent ib, dibdabdib is necessary. This change makes vibib and vibabib behave as in normal mode. Not vim-compatible - in vim, a series of ib in visual mode does extend selection.
* Exclusive backwards-up motion with operatorsGeorgi Kirilov2023-10-041-1/+2
| | | | | | | Keeping it inclusive in normal and visual mode is useful for gradually navigating up the nesting hierarchy. In visual mode, I can easily exclude the delimiter before operating on the selection, but I don't get such a chance in operator-pending mode.
* Insert template for the sexp brackets pairsGeorgi Kirilov2023-10-041-6/+6
| | | | | | Reflects the built-in mapping b - (). Change the table format a bit, to make it easier to specify pairs at once.
* Remove newlines from TeX environment delimitersGeorgi Kirilov2023-10-041-1/+1
| | | | vis-surround can (mostly) handle them automatically now.
* Insert templates can have custom promptGeorgi Kirilov2023-10-041-4/+4
|
* Text object for TeX environmentsGeorgi Kirilov2023-10-041-0/+2
|
* Templates for pattern-delimited blocksGeorgi Kirilov2023-10-041-3/+6
| | | | | | Used in vis-surround. Can be fixed strings or strings with a placeholder which will be replaced with user input.
* Universal text object for quotesGeorgi Kirilov2023-10-041-1/+4
|
* Don't overwrite existing configurationGeorgi Kirilov2023-10-041-6/+19
|
* Universal text object for sexp bracket pairsGeorgi Kirilov2023-10-041-0/+4
|
* Stricter tag names matchingGeorgi Kirilov2023-10-041-1/+1
| | | | | The old pattern didn't work for script elements containing < or > comparisons and XML tags containing allowed punctuation characters.
* Remove the mandatory space in self-closing tagsGeorgi Kirilov2023-10-041-1/+1
|
* Suppress vis' internal textobject repetitionGeorgi Kirilov2023-10-041-0/+10
|
* Move LPeg-to-file offsets conversion outside nth()Georgi Kirilov2023-10-041-3/+10
|
* Improve the help textGeorgi Kirilov2023-10-041-2/+2
|
* DRY fixesGeorgi Kirilov2023-10-041-51/+40
|
* Fix nestingGeorgi Kirilov2023-10-041-1/+1
|
* Handle empty HTML/XML elementsGeorgi Kirilov2023-10-041-1/+1
|
* Merge the motion code with the textobject codeGeorgi Kirilov2023-10-041-5/+60
|
* Initial commitGeorgi Kirilov2023-10-041-0/+140