daeyun / vim-matlab

Neovim plugin for MATLAB
Mozilla Public License 2.0
104 stars 19 forks source link

E492: Not an editor command: MatlabCliRunSelection #20

Closed mesneym closed 7 years ago

mesneym commented 7 years ago

Hi, When I try to run the matlab code using C-m, i get an error saying "not an editor command." However, insert mode commands seem to work pretty well.

mesneym commented 7 years ago

Any help is greatly appreciated

daeyun commented 7 years ago

When happens when you run :MatlabCliRunCell ? Do other commands work?

mesneym commented 7 years ago

No, it doesn't work. Same response E492: Not an editor command: MatlabCliRunCell .

mesneym commented 7 years ago

However, the C-I command works

mesneym commented 7 years ago

MatlabNormalModeCreateCell. By the way i am using neovim

daeyun commented 7 years ago

Do you have the python3 neovim package installed? How did you install vim-matlab? Did you run :UpdateRemotePlugins after installing?

mesneym commented 7 years ago

yes. I already had neovim installed and I have used other plugins before. Also did update the plugins after installing.

daeyun commented 7 years ago

I suspect that the python part of the plugin is not recognized somehow. MatlabNormalModeCreateCell is defined in vimscript and doesn't use python.

Can you try the commands in https://github.com/daeyun/vim-matlab/blob/master/rplugin/python/vim_matlab/__init__.py ? e.g. MatlabPrintCellLines, MatlabRename, etc

mesneym commented 7 years ago

Still giving me the same response. Not an editor command.

daeyun commented 7 years ago

I can't reproduce the issue. I'm using Neovim 0.2.0, python2-neovim 0.1.13 (not python3, sorry), and ubuntu 16.04. Do you see any warnings when you edit the matlab file with neovim?

Just to make sure, not all neovim plugins use python. Ones that do need https://github.com/neovim/python-client

mesneym commented 7 years ago

No, i don't get any warnings.

daeyun commented 7 years ago

what versions of neovim and python neovim client are you using?

mesneym commented 7 years ago

python 2.7.13 neovim-0.1.13 neovim-0.2.1

tdy commented 7 years ago

Do your other python plugins work properly at this moment? It really sounds like there's a disconnect between your neovim and python right now.

I would run :UpdateRemotePlugins again just for completeness. Also just to clarify, this isn't the same thing as updating with a plugin manager (e.g., vim-plug's :PlugUpdate). It's a neovim-specific command.

mesneym commented 7 years ago

Yes. I have deoplete which is configured to work with python3 and it works fine. Also I did do :UpdateRemotePlugins still gave me the same results.

mesneym commented 7 years ago

After runing :UpdateRemotePlugins remote/host: Python3 host registered plugins('deoplete') remote/host: python host registered plugins('vim-matlab') remote/host: generate rplugin manifest home/username/.local/share/nvim/rplugin.vim

mesneym commented 7 years ago

It now works. I reinstalled it and repeated the same procedure. I just don't know what went wrong.