vscode-modal-editor icon indicating copy to clipboard operation
vscode-modal-editor copied to clipboard

Add `modaleditor.selectLine` and `modaleditor.selectToEndOfLine`

Open ambv opened this issue 6 months ago • 0 comments

Using VSCode's expandLineSelection for "x" has the unfortunate consequence of being unable to select just one empty line... if that line is followed by a non-empty line. But if the empty line you want to select is followed by another empty line, VSCode allows you to select it.

The new selectLine command provides an implementation that always selects the current line, regardless of its contents and what the line is followed by. It still supports expanding the selection.

I also added a companion stateful command to allow you to select to the last character of the line (I have this mapped to $) but on second press it also selects the end of the line, too, allowing fast paragraph reflows.

ambv avatar Jun 24 '25 18:06 ambv