Skip to content

Match menu a la Helix editor

Jonathan edited this page Aug 14, 2022 · 1 revision

This adds something similar to Helix's match menu. Useful for macOS users, since Alt+i doesn't work.

    {
        "key": "m",
        "command": "dance.openMenu",
        "when": "editorTextFocus && dance.mode == 'normal'",
        "args": {
            "menu": {
                "items": {
                    "i": {
                        "text": "select inside",
                        "command": "dance.seek.askObject.inner",
                    },
                    "a": {
                        "text": "select around",
                        "command": "dance.seek.askObject",
                    },
                    "m": {
                        "text": "goto matching bracket",
                        "command": "dance.seek.enclosing"
                    }
                }
            }
        }
    },