71/dance

Add command to toggle extension

Closed this issue · 2 comments

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 commented

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 commented

Note: a recipe was added for this use case.