Closed justb3a closed 2 years ago
Hi,
Try replacing <Cmd>
with a :
. <Cmd>
executes the command directly without changing modes which is why <C-R>
doesn't work.
(As a sidenote, questions like these are more likely to get an answer on dedicated support forums like the Neovim Discourse)
Tried this as well, didn't work at first glance. Now I tried it again, I was waiting for the path being shown so that I could extend it. Now I discovered that only if you type something, the path will appear and then it works. Thanks.
(Thanks for the sidenote link ;) )
You shouldn't have to type anything apart of the keymap itself. I suspect you have another keymap for <leader>e<something>
and nvim waits for more input. Try: :nmap <leader>e
to see what mappings you have set up.
Now I discovered that only if you type something, the path will appear and then it works.
Does removing silent = true
fix it?
PSA: There's a full Lua API now (vim.keymap.*
), so I'd probably focus on just that now.
I use a custom keymap function, silent = true
was set by default 🤦🏻♀️. Thanks for your help! 🚀
Hi,
I'm struggeling a while now with this and tried serveral solutions. My goal is to use the edit command with the path of the currently edited file filled in:
Using it directly just works as expected.
I tried to wrap
<C-R>
in thetermcodes
function and several other ways, but none of them worked. Maybe there is even a better way to solve this with lua. Any help is appreciated 🙏🏻