Skip to content

Custom keymap for specific command #206

Answered by kylechui
jesus-333 asked this question in Q&A
Discussion options

You must be logged in to vote

Assuming you are using vim.keymap.set, the remap flag is set to false by default, so Neovim is interpreting ysiwb in terms of built-in commands, having no knowledge of nvim-surround bindings. You want to set remap to true, i.e.

vim.keymap.set("n", "((", "ysiwb", { remap = true })

See :h vim.keymap.set and :h remap for more details.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@jesus-333
Comment options

Answer selected by jesus-333
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants