Closed yanganto closed 4 years ago
https://github.com/yanganto/nvim-translate/blob/develop/rplugin/python/translate.py#L126
It is syntax error.
It must be:
h = s.split('u')[0]
if h:
I can see the syntax error by :UpdateRemotePlugins
output.
@Shougo That is valid syntax in python 3.8, probably unrelated to the actual issue here.
No. Because the plugin is for Python2. Please see the rplugin path.
They probably intended it to be for python3, so the file should to be moved to rplugin/python3
then.
Yep, I use python 3.8.2 on Archlinux, in which default python is Python 3.8.2 now.
@bfredl, @Shougo I am sorry not to provide this information at first because I can not use rplugin/python3
but it can be work in rplugin/python
. Besides, I try to put the code in the TranslateByte
function into Translate
function the code with the python3.8 operator :=
still work fine. So I think the issue is not the python3 syntax.
I find the command register in ~/.local/share/nvim/rplugin.vim
, and everything works well after I use :UpdateRemotePlugins
, to update the command register. Thanks for your time. I appreciate.
Hi, I run to a strange environment, and I want to debug to know the command registered from a plugin. How can I do this? Thanks.
The more detail that I run into is that in this
nvim-translate
, theTranslate
(before TranslateByte) andTranslateAll
(after TranslateByte) are correct working, butTranslateByte
is a non-exist command. https://github.com/yanganto/nvim-translate/blob/develop/rplugin/python/translate.py#L44 If you are willing to point out the exact problem, I will very much appreciate.