{"id":20688757,"url":"https://github.com/71/dance","last_synced_at":"2025-10-06T21:15:50.879Z","repository":{"id":38983443,"uuid":"179442370","full_name":"71/dance","owner":"71","description":"Make your cursors dance with Kakoune and Helix-like modal editing in VS Code.","archived":false,"fork":false,"pushed_at":"2025-09-15T13:11:02.000Z","size":2097,"stargazers_count":493,"open_issues_count":81,"forks_count":76,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-09-24T12:33:11.943Z","etag":null,"topics":["kakoune","keybindings","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=gregoire.dance","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/71.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-04-04T07:13:18.000Z","updated_at":"2025-09-21T18:26:39.000Z","dependencies_parsed_at":"2023-02-08T06:16:26.700Z","dependency_job_id":"ce5bce7d-ed7f-453e-9646-a7dc056ceb80","html_url":"https://github.com/71/dance","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/71/dance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Fdance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Fdance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Fdance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Fdance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/71","download_url":"https://codeload.github.com/71/dance/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Fdance/sbom","scorecard":{"id":5506,"data":{"date":"2025-08-11","repo":{"name":"github.com/71/dance","commit":"e017a76699612a38a52850256f37258a6917941c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 4/30 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":8,"reason":"dependency not pinned by hash detected -- score normalized to 8","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/71/dance/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/71/dance/main.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   4 out of   4 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: ISC License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"16 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc","Warn: Project is vulnerable to: GHSA-f9xv-q969-pqx4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T13:27:47.889Z","repository_id":38983443,"created_at":"2025-08-14T13:27:47.889Z","updated_at":"2025-08-14T13:27:47.889Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278681438,"owners_count":26027473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kakoune","keybindings","vscode","vscode-extension"],"created_at":"2024-11-16T23:06:52.486Z","updated_at":"2025-10-06T21:15:50.873Z","avatar_url":"https://github.com/71.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Dance\n\n[Kakoune]-inspired key bindings, modes, menus and scripting for\n[Visual Studio Code][vsc].\n\n## Huh?\n\nDance provides [Kakoune]-inspired commands and key bindings for\n[Visual Studio Code][vsc], as well as support for custom modes and scripting.\n\nAdded key bindings are (mostly) compatible with [Kakoune]'s, but are meant to be\nan addition to [Visual Studio Code][vsc], rather than an emulation layer on top\nof it.\n\n#### Why [VS Code][vsc], and not [Kakoune] directly?\n\n- Kakoune is an efficient and lightweight editor with a very small ecosystem. VS\n  Code is an entire IDE with a huge ecosystem and many existing extensions.\n- Kakoune is Unix-only.\n\n#### Why [Kakoune]'s key bindings, and not [Vim]'s?\n\n- Whether you prefer Vim, Emacs or Kakoune key bindings is a matter of\n  preference. I, for one, prefer\n  [Kakoune's](https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc).\n- Vim's key bindings are [already available to VS Code users][vscodevim].\n\n#### Why is it merely 'inspired' by [Kakoune]?\n\n- Unlike [VSCodeVim] which attempts to emulate Vim, Dance's only goal is to\n  provide VS Code-native [commands][vsccommands] and\n  [key bindings][vsckeybindings] that are inspired by [Kakoune].\n  - Some features are provided to mimic Kakoune's behavior (e.g. treating\n    positions as coordinates of characters, rather than carets between\n    characters like VS Code), but are optional.\n- Kakoune, Vim and VS Code are all fully-fledged text editors; therefore, they\n  have overlapping features. For instance, where [VSCodeVim] provides its own\n  multi-cursor and command engines to feel more familiar to existing Vim users,\n  Dance leaves multi-cursor mode and editor commands to VS Code entirely.\n\n## User Guide\n\nFor most [commands], the usage is the same as in [Kakoune]. However, the\nfollowing changes have been made:\n\n### Custom modes\n\nAll modes are custom. By default, the `normal` and `insert` modes are defined,\nand many [Kakoune]-inspired keybindings are available. More modes can be\ncreated, though. These modes are configured with `dance.modes`.\n\nFor an example of this (which both creates a new mode and adds keybindings to\nit), see\n[\"Extend select mode\"](https://github.com/71/dance/wiki/Extend-select-mode) in\nthe wiki.\n\n### Selection behaviors\n\nDance by default uses caret-based selections just like VS Code. This means a\nselection is anchored between two carets (i.e. positions between characters),\nand may be empty.\n\nIf you prefer character-based selections like Kakoune, please set\n`\"selectionBehavior\": \"character\"` in the configuration of the mode in which you\nwish to use character-based selections. This mode is designed to work with\nblock-style cursors, so your configuration would typically look like:\n\n```jsonc\n\"dance.modes\": {\n  \"insert\": {\n    // ...\n  },\n  \"normal\": {\n    \"cursorStyle\": \"block\",\n    \"selectionBehavior\": \"character\",\n    // ...\n  }\n},\n```\n\nIf this is enabled, Dance will internally treat selections as inclusive ranges\nbetween two characters and imply that each selection contains at least one\ncharacter.\n\n### Scripting\n\nMost keybindings exposed by Dance are actually implemented by running several\nDance commands in a row. For instance, `dance.modes.set.normal` is actually a\nwrapper around `dance.modes.set` with the argument `{ mode: \"normal\" }`.\nCommands that take an input, like `dance.modes.set`, will prompt a user for a\nvalue if no argument is given.\n\nAdditionally to having commands with many settings, Dance also exposes the\n[`dance.run`][run] command, which runs JavaScript code. That code has access to\nthe [Dance API][API], and can perform operations with more control than Dance\ncommands. Where Dance commands in the `dance.selections` namespace operate the\nsame way on all selections at once, [`dance.run`][run] can be used to\nindividually manipulate selections. It can also be used to run several commands\nat once.\n\nFinally, the [Dance API][API] is exported by Dance. Other VS Code extensions can\nspecify that they depend on Dance (with the\n[`extensionDependencies` property](https://code.visualstudio.com/api/references/extension-manifest#fields)),\nand then access the API by calling\n[`activate`](https://code.visualstudio.com/api/references/vscode-api#Extension.activate):\n\n```js\nconst { api } = await vscode.extensions.getExtension(\"gregoire.dance\")\n  .activate();\n```\n\n### Pipes\n\nPipes no longer accept shell commands, but instead accept \"expressions\", those\nbeing:\n\n- `#\u003cshell command\u003e`: Pipes each selection into a shell command (the shell\n  respects the `terminal.integrated.automationProfile.\u003cos\u003e` profile).\n- `/\u003cpattern\u003e[/\u003creplacement\u003e[/\u003cflags\u003e]`: A RegExp literal, as\n  [defined in JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions).\n  Do note the addition of a `replacement`, for commands that add or replace\n  text.\n- `\u003cJS expression\u003e`: A JavaScript expression in which the following variables\n  are available:\n  - `$`: Text of the current selection.\n  - `$$`: Array of the text of all the selections.\n  - `i`: Index of the current selection.\n  - `n`: Number of selections in `$$`.\n\n  Depending on the result of the expression, it will be inserted differently:\n  - `string`: Inserted directly.\n  - `number`: Inserted in its string representation.\n  - `boolean`: Inserted as `true` or `false`.\n  - `null`: Inserted as `null`.\n  - `undefined`: Inserted as an empty string.\n  - `object`: Inserted as JSON.\n  - Any other type: Leads to an error.\n\n#### Examples\n\n- `/(\\d+),(\\d+)/$1.$2/g` replaces `12,34` into `12.34`.\n- `i + 1` replaces `1,1,1,1,1` into `1,2,3,4,5`, assuming that each selection is\n  on a different digit.\n\n### Status bar\n\nDance provides several status bar segments (left-aligned) exposing info similar\nto Kakoune's default mode-line. Most of them are hidden by default and only\nshown contextually:\n\n- current mode: click to switch to another mode\n- macro recording status: click to stop recording\n- current count prefix: click to reset to 0\n- current register: click to unset\n- dance error: click to copy the full description of the last error\n\n### Dance view\n\nDance also provides a\n[custom view](https://code.visualstudio.com/docs/getstarted/userinterface#_views)\nwhich lists all registers and their contents.\n\n### Miscellaneous changes\n\nA few changes were made from Kakoune, mostly out of personal preference, and to\nmake the extension integrate better with VS Code.\n\n- The default yank register `\"` maps to the system clipboard.\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions)s\n  given to Dance commands support being given additional flags with the `(?i)`\n  syntax (but **only** at the start of the pattern).\n- Registers can have arbitrary names. If the name of a register starts with a\n  single space character, it will be local to the current document.\n- When using the default configuration (that is to say, these settings can be\n  modified):\n  - The cursor is not a block, but a line: Dance focuses on selections, and\n    using a line instead of a block makes it obvious whether zero or one\n    characters are selected. Besides, the line-shaped cursor is the default in\n    VS Code.\n  - Changing the mode will also change the `editor.lineNumbers` configuration\n    value to `on` in `insert` mode, and `relative` in normal mode.\n\n### Troubleshooting\n\n- Dance uses the built-in VS Code key bindings, and therefore does not override\n  the `type` command. **However**, it sometimes needs access to the `type`\n  command, in dialogs and register selection, for instance. Consequently, it is\n  not compatible with extensions that always override the `type` command, such\n  as [VSCodeVim]; these extensions must therefore be disabled.\n- If you're on Linux and your keybindings don't work as expected (for instance,\n  `swapescape` is not respected), take a look at the\n  [VS Code guide for\n  troubleshooting Linux keybindings](https://github.com/Microsoft/vscode/wiki/Keybinding-Issues#troubleshoot-linux-keybindings).\n  TL;DR: adding `\"keyboard.dispatch\": \"keyCode\"` to your VS Code settings will\n  likely fix it.\n\n## Helix\n\nDance also supports [Helix](https://helix-editor.com) keybindings, as they are\nvery similar to Kakoune's. The source code for all keybindings is shared in `src`,\nwith the [Helix extension](extensions/helix) defining new modes (`helix/normal`,\n...) with different sets of built-in keybindings.\n\nThe Helix extension is available in the [VS Code marketplace](\nhttps://marketplace.visualstudio.com/items?itemName=gregoire.dance-helix).\n\n## Contributing\n\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md).\n\n[api]: ./src/api\n[commands]: ./src/commands\n[vim]: https://www.vim.org\n[kakoune]: https://github.com/mawww/kakoune\n[run]: ./src/commands/README.md#run\n[vsc]: https://github.com/Microsoft/vscode\n[vscodevim]: https://github.com/VSCodeVim/Vim\n[vsccommands]: https://code.visualstudio.com/api/extension-guides/command\n[vsckeybindings]: https://code.visualstudio.com/docs/getstarted/keybindings\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F71%2Fdance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F71%2Fdance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F71%2Fdance/lists"}