Closed thepenguinthatwants closed 3 years ago
noremap
should be false, since what you want to achieve is literally remapping the <plug>
key to another command ;)
You can also pass the plug to register to let WhichKey handle it. We automatically set noremap=false
for <Plug>
commands.
something like:
wk.register({
["<leader>z"] = { '<Plug>(zoom-toggle)' , 'zoom' }
})
or
wk.register({
z = { '<Plug>(zoom-toggle)' , 'zoom' }
}, {prefix = "<leader>")
:D Thanks, damn I was dull for not noticing that its remapping.
If I am not wrong the improvement with registers is actually giving ability to map without using leader key and have a cheatsheet type of help.
Thats insanely cool.
Like I mapped to leader as I had now clue how to get the
<C-w>z to work.
wk.register({
["<C-w>z"] = { '<Plug>(zoom-toggle)' , 'zoom' }
})
This worked perfectly! The improvement is insane!
Glad you like it 😄
Hi Folke, Using which-key plugin that has being converted to lua was insane improvement to quick and slickness.
There is something I haven't gotten to work with this plugin.
let g:which_key_map['z'] = [ '<Plug>(zoom-toggle)' , 'zoom' ]
This worked with the old plugin
When I tried to convert into lua , I haven't figured out why it doesnt seem to work at all.
vim.api.nvim_set_keymap("n", "<leader>z", "<Plug>(zoom-toggle)", {noremap = true, silent = true})
Any clue what I might be missing with this syntax?