[Feature] Implement Select mode
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start by reviewing the existing API and how vim-visual and vim-insert modes are represented in this CodeMirror Vim integration. Trace how a visual selection is preserved when changing modes, then determine where a global select-mode command belongs for CodeMirror-based editors. Done means the command switches to insert-like behavior while retaining the current selection and keeps select-mode shortcuts separate from visual-mode bindings.
Written by the indexing model from the issue text.
Description
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:
https://github.com/user-attachments/assets/e3823b2d-6dcc-45c5-a3f7-50fca1e9898a
- Dominant language
- JavaScript
- Stars
- 470
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from replit/codemirror-vim
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
replit/codemirror-vim#276 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
replit/codemirror-vim#264 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
replit/codemirror-vim#251 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
replit/codemirror-vim#243 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
replit/codemirror-vim#238 ·
All issues in replit/codemirror-vim
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
babalae/bettergi-scripts-list#3674 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vadimdemedes/ink#1029 ·
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·