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

im extension should also follow the command dynamicly register and release patern. otherwise other extension could not use the 'type' command #1500

Closed
metasong opened this issue Apr 12, 2017 · 1 comment

Comments

@metasong
Copy link

metasong commented Apr 12, 2017

when installed vscodevim and jumpy or acejump or metago. there will be problems to use other extensions
for example with metago, if you press alt+; and then press the charactor, and type the codes you will go to that location. but currently because vim already registed the 'type' command and never dispose it when not used.

registerCommand(context, 'type', async (args) => {
    taskQueue.enqueueTask({
      promise: async () => {
        const mh = await getAndUpdateModeHandler();

        if (compositionState.isInComposition) {
          compositionState.composingText += args.text;
        } else {
          await mh.handleKeyEvent(args.text);
        }
      },
      isRunning: false
    });
  });

this cause others could not register this 'type' command and release it when not used.

the vim extension should also follow the dynamicly register and release patern. otherwise other extension could not use the 'type' command

@rebornix
Copy link
Member

First of all, this is by-design, Code only allows one single handler for type microsoft/vscode#13441.

Secondly, I don't get the idea of release it when not used, if we dispose the handler when not used, next time when users want to use Vim, they have to run a command or restart VS Code to bind the handler again, which is not reasonable.

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

No branches or pull requests

2 participants