Place inactive cursors and selections with KCS: Place Inactive Selection
command.
Inactive cursors and selections are activated with KCS: Activate Selections
command.
By default the commands are mapped to PageDown
and PageUp
respectively. If you need help in remapping them, check below.
For questions, suggestions, issues, feel free to use the Issues section of the extension's repository.
Open the Command Palette (Windows/Linux: Ctrl + Shift + P
, Mac: Cmd + Shift + P
).
Search for and select Preferences: Open Keyboard Shortcuts
.
Once the Shortcuts tab is open, search for the desired command, for example Place Inactive Selection
, double click on it and press the new key combination.
Placing multiple inactive cusors and selections at once is also supported
Esc
If you place an inactive cursor or selection over another, the existing one will be removed
Undo-Redo system
It registers all actions that have as effect placing or removing inactive cursors and selections. These can be undone or redone via two commands:
KCS: Undo
Default mapping: Windows/Linux: alt + shift + z
, Mac: option + shift + z
.
KCS: Redo
Default mapping: Windows/Linux: alt + shift + y
, Mac: option + shift + y
.
Experimental: Inactive cursors and selections react to document edits
When you make edits to the document, the inacitve cursors and selections will move across the document in accordance with those edits.
This feature is also integrated with the Undo-Redo system, meaning that the undone or redone inactive cursors and selections will respect the new document edits.
By default this feature is enabled. If you wish to disable this, it is found in VS Code Settings under the name Kcs: Inactive Selections React To Document Edits
.
Please report any issues you have about this experimental feature.
You can change the colors of the inactive cursors and selections
Open the Command Palette (Windows/Linux: Ctrl+Shift+P
, Mac: Cmd+Shift+P
).
Search for and select Preferences: Open Settingts (UI)
.
Once the settings view is open, type "kcs" and options like Kcs: Cursor Color
and Kcs: Selection Color
will appear. Their value has to be given in hex code.
const configuration = vscode.workspace.getConfiguration('kcs')
await configuration.update('cursorColor', '#ff0000', vscode.ConfigurationTarget.Global)
await configuration.update('selectionColor', '#ff000099', vscode.ConfigurationTarget.Global)
Note that you can use transparency, especially for the selection color.
These extension's limitations are derived from the limitations of the VS Code Extension API itself, but they are handled to minimize as much as possible their inconvenience.