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

Delay the Open menu menu #180

Closed
sransara opened this issue Jun 24, 2021 · 1 comment
Closed

Delay the Open menu menu #180

sransara opened this issue Jun 24, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@sransara
Copy link

sransara commented Jun 24, 2021

New to Dance and just trying it out coming from Vim. Loving the flexibility.

Is there a possibility to add functionality in delaying the menu from showing up for a little bit?

The menu is very helpful in discoverability but can be distractive when it keeps popping up for simple commands.

My use case is, I have the jk to escape suggested mapping using Open menu in Insert mode (#74 (comment)). But every time j is typed in a document the menu pops up.

@71 71 self-assigned this Jun 24, 2021
@71 71 added the enhancement New feature or request label Jun 24, 2021
@71 71 closed this as completed in 8d53e0d Jun 24, 2021
@71
Copy link
Owner

71 commented Jun 24, 2021

That's an interesting idea. 8d53e0d adds a delay parameter to the openMenu command:

{
  "key": "j",
  "command": "dance.openMenu",
  "args": {
    "menu": {
      "items": {
        "k": {
          "text": "escape to Normal",
          "command": "dance.modes.set.normal",
        },
        "j": {
          "text": "insert j",
          "command": "default:type",
          "args": {
            "text": "j"
          },
        }
      },
    },
    "prefix": "j",
    "delay": 1000,
  },
  "when": "editorTextFocus && dance.mode == 'insert'"
}

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

No branches or pull requests

2 participants