Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Extension state get's resetted on reconfigure

Open
#130 6 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from replit/codemirror-vim

All issues in replit/codemirror-vim

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.