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

[Question]: Operator black hole not registering #271

Closed
lmburns opened this issue Apr 22, 2022 · 1 comment
Closed

[Question]: Operator black hole not registering #271

lmburns opened this issue Apr 22, 2022 · 1 comment
Labels

Comments

@lmburns
Copy link

lmburns commented Apr 22, 2022

All of the other operators (i.e, g, y, c, and v) work just fine. However, I have remapped d to "_d because I do not want to copy what I delete to my clipboard, and the operator window will not appear unless the mapping is removed.

I've tried the following:

  1. Placing the mapping before and after this
local presets = require("which-key.plugins.presets")
presets.operators['"_d'] = "Delete blackhole"
  1. Trying to somehow mimic the operator behavior in the source code
wk.register(
    {
        ["d"] = {[["_d]], "Delete blackhole"}
    },
    {prefix = "", preset = true}
)
  1. Setting it in the .setup() call
wk.setup({
  operators = {
      gc = "Comments",
      ['"_d'] = "Delete (blackhole)",
      -- ['d'] = "Delete (blackhole 2)" -- I tried both here
  },
})

I was not able to directly get d to trigger the operator popup window. I was able to get the key sequence that is being bound to d to show the popup window. That is, whenever I would press "_d manually, the popup window would appear and it would not copy it to my clipboard.

I'm unsure how to change this behavior.

Copy link
Contributor

github-actions bot commented Jul 7, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Jul 7, 2024
@folke folke closed this as completed Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants