Skip to content
Discussion options

You must be logged in to vote

It can be done in user-space configuration, but it is not an ideal solution:

vim.keymap.set("n", "<Leader>w", "<C-w>", { desc = "+Window" })

local windows_clue = function(trigger, opts)
  local clues = MiniClue.gen_clues.windows(opts)
  if trigger then
    for _, clue in ipairs(clues) do
      clue.keys = string.gsub(clue.keys, "^<C%-w>", trigger)
    end
  end
  return clues
end

local MiniClue = require("mini.clue")
MiniClue.setup({
  triggers = {
    { mode = "n", keys = "<C-w>" },
    { mode = "n", keys = "<Leader>w" },
  },
  clues = {
    windows_clue(),
    windows_clue("<Leader>w"),
  },
})

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@echasnovski
Comment options

@rynoV
Comment options

Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.clue
3 participants