The selection is the highlighted region (by default blue) of the buffer. A Copy operation copies the contents of the selection to the clipboard. View and line-edit modes have extra shortcuts and other conveniences for working with the selection. Unless otherwise noted, this section applies to both.
The two end-points of the selection are called the anchor and the focus points. The anchor is where you start the selection (typically on mouse-down), while the focus is current/active end of the selection: As you drag the mouse the focus follow the mouse, until mouse-up. In paging and line-edit modes the focus end is indicated with a vertical bar, by default purple.
The commands in this section do not move the edit caret, only the focus position.
Commands that move the focus will scroll the view so the focus remains in the view.
Copy selection to clipboard. (Selection can be partly or fully outside input area.)
copy-text-or-interrupt) (Not MacOS)
If there is no selection send Ctrl+C to the process - which normally interrupts it. If the previous keycommand was also a Ctrl+C, do as the no-selection case, so typing Ctrl+C twice will always interrupt. If there is a selection, copy it to the clipboard.
If there is a non-collapsed selection, swap focus and anchor (selection ends).
The following commands modify the buffer, so are only available in line-edit mode, not view mode:
Shift+Insert(Only Electron, Qt, Webview)
Paste selection from clipboard.
Cut (delete) the selection and copy the contents to clipboard. Only removes text within the input area.
Pressing Shift while executing a movement command (such as Left) will extend the selection: The focus is moved as specified by the unshifted command (such as Left to move one character left), but the anchor stays where it was. The selected area expands or shrinks, depending on the movement. If there was no selection, the anchor is set to the initial location of the focus (in view mode) or the edit caret (in line-edit mode).
These operations will scroll as needed so the focus remains visible.
A mouse click (button-1) with
Shift held will extend
the selection by moving the focus position leaving the anchor position in place.
Extends the current selection by
(If there is no selection, the caret position is treated as
a zero-size selection.)
Cmd+Shift+Lefton Mac) (
Cmd+Shift+Righyon Mac) (
Extend(or reduce) the current selection by
Extend selection to start/end of line.
Extend selection by moving focus up/down
Alt+Shift+Home(paging mode only) (
Alt+Shift+End(paging mode only) (
Extend selection by moving focus position to start/end of the buffer.
Alt+Shift+Home(line-edit mode only) (
Alt+Shift+End(line-edit mode only) (
Extend selection by moving focus position to start/end of the input area.
Extend mode allows extending (or shrinking) the
selection using keyboard commands without pressing
The effect is similar to setting the mark in the Emacs editor.
For example when extend mode is active,
Right key extends the selection by one character
Shift+Right was pressed.
Toggle extend mode.
A visual indication of extend mode is that the focus caret changes color from purple to orange, and the color of the selection changes.
Generally, if some key
X is pressed in extend mode
Shift+ is bound to a command
whose name ends with
-extend, that command is executed instead.
Cmd+Lefton Mac) (
Cmd+Righton Mac) (
Alt+Home(paging mode only) ((
Alt+End(paging mode only) ((
Alt+Home(line-edit mode only) (
Alt+End(line-edit mode only) (
Extends the selection, as if
Shift was pressed.
Exit extend mode, returning to plain view or line-edit mode.