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

Add command to toggle extension #189

Closed
tomKPZ opened this issue Aug 13, 2021 · 2 comments
Closed

Add command to toggle extension #189

tomKPZ opened this issue Aug 13, 2021 · 2 comments

Comments

@tomKPZ
Copy link

tomKPZ commented Aug 13, 2021

The vim extension has a vim.disableExtension setting and a toggleVim command [1]. If dance adds a similar setting, you'll be able to switch between kakoune and vim keybindings. This would benefit users like myself who prefer the navigation commands of vim, but the editing commands of kakoune.

[1] https://marketplace.visualstudio.com/items?itemName=vscodevim.vim#vscodevim-settings

@71
Copy link
Owner

71 commented Aug 14, 2021

This can be done by switching to a dummy Dance mode, i.e.

settings.json:

"dance.modes": {
  "disabled": {},
},

keybindings.json:

{
  "key": "...",
  "command": "dance.modes.set",
  "args": {
    "input": "disabled"
  },
  "when": "dance.mode != 'disabled'",
},
{
  "key": "...",
  "command": "dance.modes.set",
  "args": {
    "input": "normal"
  },
  "when": "dance.mode == 'disabled'",
},

@71 71 closed this as completed Aug 14, 2021
@71
Copy link
Owner

71 commented Aug 14, 2021

Note: a recipe was added for this use case.

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