Skip to content

[Feature] Implement Select mode #239

@superle3

Description

@superle3

Description

Implement a command that allows one to switch between vim-visual to vim-insert while keeping the current selection.
Vim originally has a select mode, described at https://vimhelp.org/visual.txt.html#Select. It keeps the current selection mode when switching but for this use case, just being able to switch is enough.

Explanation

Currently in overleaf and obsidian, you can select text and invoke some action upon that text.
For example given the following string in obsidian

|Some important text here|

(where | represents the bounds of the selection)
You can press * to convert it to

*|Some important text here|*

(select mode = vim-insert while having something selected)

The only problem here is that selecting with vim visual mode is much easier than doing it with arrow keys or with the mouse.
And these shortcuts are only available in select mode. I want to keep them only available in select mode as they would otherwise conflict with the visual-mode keybindings.

This can be already implemented with the current api, but as probably most codemirror-based editors will have some selection-based commands, it would make more sense to implement this on a global level.

video for better example:

Screencast_20250720_160250.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions