Open jcha0713 opened 1 year ago
Hi and I am glad you enjoy the plugin.
Hello, you are correct. If you have provided remove_keymaps = true
the call for setup
function becomes redundant. This is why it is not reflected in the documentation. I meant to remove it before publishing the plugin. In your case you can create a single vim.api.nvim_create_autocmd
for your custom keymap and the default one. Essentially you can copy paste the snippet of code from your message and edit the keymaps as you wish. Does this work for you?
vim.api.nvim_create_autocmd('FileType', {
pattern = 'markdown',
callback = function()
vim.keymap.set('v', '<C-b>', ":lua require('markdowny').bold()<cr>", { buffer = 0 })
vim.keymap.set('v', '<C-i>', ":lua require('markdowny').italic()<cr>", { buffer = 0 })
vim.keymap.set('v', '<C-k>', ":lua require('markdowny').link()<cr>", { buffer = 0 })
end,
})
Hi! thanks for making this plugin. I like it very much.
I'm trying to replace the default keymap for adding links with
<C-l>
. However, I don't think setting a new custom keymap as directed in the readme overrides the default keymap.If I am doing something wrong, please correct me but if not, I have two suggestions:
something like this:
This would need to use
vim.api.nvim_create_user_command
to create a command for each method. The drawback of this is that there will be no default keymaps.Again, I might be doing something very wrong so let me know if that's the case 😅