Selection actions
Development reference · View source
| Action | Modes | count | register | extend | arg | Position | Description |
|---|---|---|---|---|---|---|---|
selection-undo | normal, select | repeats | — | — | — | any | Undo the last selection change |
selection-redo | normal, select | repeats | — | — | — | any | Redo the last selection change |
select-line | normal, select | repeats | — | — | — | any | Select the current line, then extend downward |
extend-line-above | normal, select | repeats | — | — | — | any | Extend whole lines above |
extend-line-below | normal, select | repeats | — | — | — | any | Extend whole lines below |
select-line-up | normal, select | repeats | — | — | — | any | Select the current line, then extend upward |
select-all | normal, select | — | — | — | — | any | Select all text |
selection-collapse-start | normal, select, insert, replace | — | — | — | — | any | Collapse each range to its raw start offset |
selection-collapse-head | normal, select, insert, replace | — | — | — | — | any | Collapse to the raw head without converting half-open endpoints |
selection-collapse | normal, select | — | — | — | — | any | Collapse selection to the cursor |
selection-flip | normal, select | — | — | — | — | any | Flip the selection anchor and cursor |
select-around-parentheses | normal, select | — | — | — | — | any | Select around parentheses |
select-inside-parentheses | normal, select | — | — | — | — | any | Select inside parentheses |
select-around-square-brackets | normal, select | — | — | — | — | any | Select around square brackets |
select-inside-square-brackets | normal, select | — | — | — | — | any | Select inside square brackets |
select-around-braces | normal, select | — | — | — | — | any | Select around braces |
select-inside-braces | normal, select | — | — | — | — | any | Select inside braces |
select-around-angle-brackets | normal, select | — | — | — | — | any | Select around angle brackets |
select-inside-angle-brackets | normal, select | — | — | — | — | any | Select inside angle brackets |
select-around-double-quotes | normal, select | — | — | — | — | any | Select around double quotes |
select-inside-double-quotes | normal, select | — | — | — | — | any | Select inside double quotes |
select-around-single-quotes | normal, select | — | — | — | — | any | Select around single quotes |
select-inside-single-quotes | normal, select | — | — | — | — | any | Select inside single quotes |
select-around-backticks | normal, select | — | — | — | — | any | Select around backticks |
select-inside-backticks | normal, select | — | — | — | — | any | Select inside backticks |
select-inside-word | normal, select | — | — | — | — | any | Select the word under the cursor |
select-around-word | normal, select | — | — | — | — | any | Select the word under the cursor and the space beside it |
select-inside-long-word | normal, select | — | — | — | — | any | Select the WORD under the cursor |
select-around-long-word | normal, select | — | — | — | — | any | Select the WORD under the cursor and the space beside it |
select-inside-paragraph | normal, select | — | — | — | — | any | Select the paragraph’s lines |
select-around-paragraph | normal, select | — | — | — | — | any | Select the paragraph’s lines and the blank lines beside them |
select-around-closest-delimiter | normal, select | — | — | — | — | any | Select around the closest delimiter pair |
select-inside-closest-delimiter | normal, select | — | — | — | — | any | Select inside the closest delimiter pair |
selection-split-at-line-ends | normal, select | — | — | — | — | any | Place a cursor at the end of every selected line |
selection-split-at-line-starts | normal, select | — | — | — | — | any | Place a cursor at the start of every selected line |
selection-keep-primary | normal, select | — | — | — | — | any | Drop every selection except the primary |
selection-remove-primary | normal, select | — | — | — | — | any | Drop the primary selection |
selection-copy-down | normal, select | — | — | — | — | any | Add a cursor on the line below |
selection-copy-up | normal, select | — | — | — | — | any | Add a cursor on the line above |
selection-copy-down-padded | normal, select | — | — | — | — | any | Add a cursor on the line below, padding it when needed |
selection-copy-up-padded | normal, select | — | — | — | — | any | Add a cursor on the line above, padding it when needed |
selection-rotate-forward | normal, select | — | — | — | — | any | Make the next selection primary |
selection-rotate-backward | normal, select | — | — | — | — | any | Make the previous selection primary |
selection-rotate-contents-forward | normal, select | — | — | — | — | any | Rotate selected text forward |
selection-rotate-contents-backward | normal, select | — | — | — | — | any | Rotate selected text backward |
selections-keep-matching | normal, select | — | — | — | pattern | last unless arg | Keep selections matching a regular expression |
selections-remove-matching | normal, select | — | — | — | pattern | last unless arg | Remove selections matching a regular expression |
selections-align | normal, select | — | — | — | — | any | Pad with spaces so every cursor shares the rightmost column |
selections-trim | normal, select | — | — | — | — | any | Trim whitespace from every selection |