I need some help with writing a python plugin.
I know how to create a plugin but I can't find a way to run a forward or any normal mode stuff. I know I can run commands like echo with self.vim.command('echo "Hello"')
. But how can I run a forward like fc
to find the nearest c
character in the line with python? Also, I would like to run a search with /
, how can I do that?.
The only solution that comes to my mind is writing a vimscript function and call it in python with exec function()
. But I would have to write one function for each thing I need. I would call it a workaround. I need a solution. Any ideas?
:h python-command
? – muru Sep 27 '18 at 7:27