-
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
, theremap
flag is set tofalse
by default, so Neovim is interpretingysiwb
in terms of built-in commands, having no knowledge ofnvim-surround
bindings. You want to setremap
to true, i.e.See
:h vim.keymap.set
and:h remap
for more details.