-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
vim vscode extension #5125
Comments
Follow up after a bit more digging: Regarding
|
Not all monaco commands are exposed for VS Code extensions yet. You will need to wait till #4247 is done. |
Ok, makes sense. Do you understand why |
|
Would love to use Theia, but lack of Vim emulation is a deal breaker for me :/ |
I tested it out today, and the VSCode vim extension was working great! Awesome work! Makes sense that there are perf issues given the design of the VSCode Vim plugin, but that's outside the scope of this issue. |
Description
The extension for Vim emulation in VSCode quickly crashes in Theia, for at least two reasons. Likely related to #4247.
Misaligned command name for
editor.action.insertLineAfter
Out of the box some basic navigation works, like 'hjkl' based movement. However, switching to insert mode using
o
(for 'insert line after cursor') crashes:After some strategic
console.warn
additions, I understood that Theia was registering a commandmonaco.editor.action.insertLineAfter
, so I did a quick hack inpackages/core/src/common/command.ts
executeCommand()
to prefix anyeditor.*
command withmonaco.
before looking it up in the command registry.Missing command name for
default:type
With that hack,
o
would successfully insert a line after the cursor and switch to insert mode. However, any typing in edit mode resulted in the following:The same is observable by entering insert mode using
i
, which does not require themonaco.editor.*
command ID hack to reproduce.I searched for the corresponding Theia command to
default:type
so I could put another hack in place and keep testing, but it seems to me that Theia does not use a command for basic text entry, and I wasn't able to figure out how exactly button press events turn into text insertion, so that's as far as I got.Reproduction Steps
plugins
directory, placevscodevim.vim-1.8.0.vsix
inside it.cd examples/browser && yarn run start
o
. Or, pressi
, followed by any letter.OS and Theia version:
Ubuntu 18.04 - Theia dd9eb6b (HEAD on master as of submission). Running the browser example with a
plugins
directory containing the vim extension.Diagnostics:
Using node v11.9.0.
By the way, this looks like a stellar project, and I'm very excited about it!
The text was updated successfully, but these errors were encountered: