i solved mine by doing this python -m pip --user --upgrade pynvim.
PyNvim is a provider for python in NVIM
and later in the config file at ~/.config/nvim/init.vim add this line saying which python to use let g:python3_host_prog = '/usr/bin/python'
In response to Bram's answer, I have found, modified, and compiled a medical spell file that can be used with Vim.
I've made the full instructions and the source code available under a GPL3 license over here. However, I'll provide an abbreviated guide to installing the medical spell file here too.
How to install a medical spell file for vim
On a ...
I think you want to learn about insert mode abbreviations.
:iabbrev :bang #!/usr/bin/python3.9
When you type :bang in INSERT mode, the text will be replaced to #!/usr/bin/python3.9 when you trigger the abbreviation. Abbreviations are triggered when you hit the space bar or return key (among other ways).
For an abbreviation with multi-lines, use the <cr&...
I had the same problem, so I wrote my own function for it.
(Thanks to the guy below who had a way to do it without having to use the registry. I modified my own with this.)
The strategy is to store the url under the Vim-cursor to a variable
let url = expand('<cWORD>')
and then use bash to open firefox with the url as argument:
call feedkeys(':!bash ...