Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request : Option to use Vim/Neovim #30

Open
userrand opened this issue Aug 8, 2023 · 2 comments
Open

Feature request : Option to use Vim/Neovim #30

userrand opened this issue Aug 8, 2023 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@userrand
Copy link
Contributor

userrand commented Aug 8, 2023

I learned how to use vim not too long ago and probably like many vim users, anything other than vim is tedious. As i understand neovim is made to be embeddable so maybe it is possible to use neovim to handle the editing.

An example of using neovim in an electron app is the neovim extension of vscode (currently I am just using the vim extension). An example of vim in the browser is https://github.com/ajaxorg/ace

PS: I am not sure yet whether I can start looking at the code as you were refactoring the code

@userrand userrand changed the title Feature request : Feature request : Vim/Neovim support Aug 8, 2023
@userrand userrand changed the title Feature request : Vim/Neovim support Feature request : Option to use Vim/Neovim Aug 8, 2023
@JerryI
Copy link
Owner

JerryI commented Aug 14, 2023

Plugin system doesn’t have GUI for now, but it is about to be done.

I would suggest to make as wljs-package using plugin vimmode

PS: You are right regarding refactoring, it needs some more time ;(

@JerryI JerryI added the enhancement New feature or request label Aug 14, 2023
@JerryI JerryI added this to the Version 1.0 milestone Aug 19, 2023
@JerryI
Copy link
Owner

JerryI commented Sep 1, 2023

Since editor is modular, its extensions are exposed in window.EditorExtensions array.

In principle, it should work, when you just create a single file in the plugins folder

Screenshot 2023-09-01 at 11 15 41

But then in my case it throws an error ;)

kernel.js:2017 Uncaught (in promise) Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.
    at inner (kernel.js:2017:23)
    at inner (kernel.js:1992:17)
    at inner (kernel.js:1992:17)
    at flatten (kernel.js:2021:5)
    at Configuration.resolve (kernel.js:1929:25)
    at EditorState.create (kernel.js:2756:43)
    at new EditorView (kernel.js:10643:68)
    at new CodeMirrorCell (kernel.js:71492:22)
    at new CellWrapper (kernel.js:6948:22)
    at core.FrontEndCreateCell (kernel.js:7103:5)

That usually happens, when an extension (vimmode) uses slightly different version of the modules from which the main editor was built. This is very annoying, actually.

I will try to update all components to the latest versions and poke this VIM mode extension plugin a few more times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants