Giter Site home page Giter Site logo

Disable visual mappings about which-key.nvim HOT 7 CLOSED

folke avatar folke commented on May 18, 2024
Disable visual mappings

from which-key.nvim.

Comments (7)

folke avatar folke commented on May 18, 2024 1

The correct way to disable this would be to not load the operators preset and configure operators manually:

{
  plugins = {
    -- ...
    presets = {
      operators = false
      -- ..
    },
  },
  -- add operators that will trigger motion and text object completion
  -- to enable all native operators, set the preset / operators plugin above
  operators = {
    d = "Delete",
    c = "Change",
    y = "Yank (copy)",
    ["g~"] = "Toggle case",
    ["gu"] = "Lowercase",
    ["gU"] = "Uppercase",
    [">"] = "Indent right",
    ["<lt>"] = "Indent left",
    ["zf"] = "Create fold",
    ["!"] = "Filter though external program",
    -- ["v"] = "Visual Character Mode",
    gc = "Comments"
 },
}

Although, this seems a bit verbose to just disable one operator. I'll see if I can come up with an easier way to do this.

from which-key.nvim.

folke avatar folke commented on May 18, 2024 1

I think I'll just add some proper documentation on how to set up operators, motions and text objects and how the preset works in regards to that. You can leave it open for now :)

from which-key.nvim.

klooj avatar klooj commented on May 18, 2024

you need to specify a mode. i think that should fix it.

so wk.register({['v'] = 'which_key_ignore'}, {mode = 'n'}) and wk.register({['v'] = 'which_key_ignore'}, {mode = 'v'})

from which-key.nvim.

klooj avatar klooj commented on May 18, 2024

nevermind. i'm getting this error after timeoutlen if i just press v once in normal mode:
image

from which-key.nvim.

NTBBloodbath avatar NTBBloodbath commented on May 18, 2024

Strange, I just placed it and it didn't give errors, however instead of showing +Visual Character Mode, it shows +which_key_ignore 🤔

Maybe it's not possible to disable triggering WhichKey in visual mode (for now), although it's not something that is very annoying

Screenshot_20210429_194419

from which-key.nvim.

NTBBloodbath avatar NTBBloodbath commented on May 18, 2024

Thank you very much, it works great 😃

Should I close the issue or will it be closed when making changes?

from which-key.nvim.

NTBBloodbath avatar NTBBloodbath commented on May 18, 2024

Understood, thank you very much again 🙂

from which-key.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.