-
|
Premising that I am not a lua expert or a Vim expert... I start some months ago to use neovim and I loved it. Now I'm trying to create my costum keymaps for all the plugin that I have installed. I tried to remap some of the commands that I use more often to simple combination of key. keymap("n", "((", "ysiwb", opts)to add the round brackets around a word but it doesn't work. I'd like to add similar commands also for other symbols (e.g. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Assuming you are using vim.keymap.set("n", "((", "ysiwb", { remap = true })See |
Beta Was this translation helpful? Give feedback.
-
|
Very nice! I think this deserves to go into the readme? |
Beta Was this translation helpful? Give feedback.
Assuming you are using
vim.keymap.set, theremapflag is set tofalseby default, so Neovim is interpretingysiwbin terms of built-in commands, having no knowledge ofnvim-surroundbindings. You want to setremapto true, i.e.See
:h vim.keymap.setand:h remapfor more details.