How can I execute this from Vimscript? #54
Replies: 1 comment
-
This works (vim) call nvim_feedkeys("c\<cmd>lua require'spider'.motion('e')\<CR>", "n", v:true) And so does this from lua (wrapping it in vim.cmd[[call nvim_feedkeys("c\<cmd>lua require'spider'.motion('e')\<CR>", "n", v:true)]] Weirdly enough, I wasn't able to get either of these solutions to work :/ (lua) vim.api.nvim_feedkeys([[c\<cmd>lua require"spider".motion("e")\<CR>]], "n", true) (lua) local keys = vim.api.nvim_replace_termcodes([[c\<cmd>lua require"spider".motion("e")\<CR>]], true, false, true)
vim.api.nvim_feedkeys(keys, "n", false) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to do something like db but with nvim-spider and from Vimscript. For the love of me couldn't find a solution; I was expecting something like
exe "norm! c" | | lua require('spider').motion('e')
to work.
(The only thing that seems to work is the
<cmd>
thing that can only appear in mappings:map <space> c<cmd>lua require('spider').motion('e')<CR>
).Beta Was this translation helpful? Give feedback.
All reactions