Extension state get's resetted on reconfigure
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- tooling
Research direction
Start by examining the custom Codemirror class and the extension reconfiguration path described in the issue. Trace how editor state is saved and restored when tabs are swapped, then determine whether Vim mode and history survive reconfiguration. Done means the preserved state can be reapplied without resetting the mode or other requested Vim state.
Written by the indexing model from the issue text.
Description
We want to use this extension to provide the svelte repl with Vim keybinginds. However we are running into an issue because we need to store the state of the editor on a per document basis (you can swap between tabs and each tab has it's own state and most importantly history). To reset the history we need store the codemirror state of every tab, and upon swapping tab restore the old codemirror state.
By doing so however every extension get's resetted so we need to also add an effect to reconfigure the set of extensions. Doing this reset the internal state of this extension (so for example if you are in insert mode it get's resetted to normal mode) and that's kinda of annoying. Part of the reason this happens is because this extension store all the information in a custom class (also called Codemirror) which is not a facet so when you save the state from Codemirror it doesn't gets serialized. I realize this is a massive overhaul of the current implementation so i totally understand if you decide to not address this.
However in case you are not planning to implement this would you consider instruct me on how could i store the vim state and re-apply this state after the reconfiguration? I'm especially concerned about the mode but all the other state would be cool to.
- Dominant language
- JavaScript
- Stars
- 473
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
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
-
[Bug] Exiting Visual mode at end of line leaves the Normal-mode cursor past the final characterOpen
Difficulty 3/5 1-2 days Newbie friendliness 65/100
replit/codemirror-vim#277 ·
-
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 ·
All issues in replit/codemirror-vim
Similar issues
-
[Feature]:Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
automated issue report
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
lirantal/discoprint#36 ·
Maintainers usually reply within 1 day
-
accepting PR Content:HTML
Difficulty 1/5 Under an hour Newbie friendliness 88/100
mdn/content#45988 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
txn2/mcp-data-platform#2030 ·
Maintainers usually reply within 1 day