jupyterlab-contrib / jupyterlab-vim

Vim notebook cell bindings for JupyterLab
https://jupyterlab-contrib.github.io/jupyterlab-vim.html
MIT License
691 stars 43 forks source link

Can't get this extension working on my jupyter lab environment #6

Closed roytseng-tw closed 1 year ago

roytseng-tw commented 4 years ago

I'm using python 3.7.6 And below is my jupyter enviroment (obtained with conda list jupyter)

# Name                    Version                   Build  Channel
jupyter                   1.0.0                      py_2    conda-forge
jupyter_client            6.1.3                      py_0    conda-forge
jupyter_console           6.1.0                      py_1    conda-forge
jupyter_core              4.6.3            py37hc8dfbb8_1    conda-forge
jupyterlab                2.1.2                      py_0    conda-forge
jupyterlab_server         1.1.3                      py_0    conda-forge

I have tried jupyter lab clean and then jupyter lab build, but still can't get it working. I have successfully used the vim extension on jupyterlab 1.X. I also noticed that there's a system default shortcut ii for interrupting the kernel. However, disabling it won't help either.

What's other possible causes ? Thank you very much.

axelfahy commented 4 years ago

Maybe you can try to re-create your environment from scratch. How did you install the plugin? Using the Extension Manager inside JupyterLab?

ricecooker commented 4 years ago

I was having trouble too with Jupyter 2.1.5. To check my extensions, I did the following:

$ jupyter labextension list
JupyterLab v2.1.5
Known labextensions:
   app dir: /Users/dcheng/miniconda/share/jupyter/lab
        @axlair/jupyterlab_vim v0.12.4  enabled  OK
        @jupyterlab/toc v4.0.0  enabled  OK
        jupyterlab-plotly v4.8.2  enabled  OK

Uninstalled core extensions:
    @axlair/jupyterlab_vim

In order to fix my problem I had to delete the file mentioned in #12. In my case it was rm ~/miniconda3/share/jupyter/lab/settings/*.json

After that I did a jupyter lab clean; jupyter lab build, everything worked.

Hope that helps.

StanczakDominik commented 4 years ago

Yup, that's a solid and working fix.

arnelg commented 3 years ago

I was not able to make this extension work with jupyterlab 3.0.0 and after installing the extension using pip install jupyterlab_vim. I checked that the extension was activated ("enabled OK") using jupyter labextension list. I tried the above suggested fix, but it did not help. I then uninstalled the extension again using pip, downgraded to jupyterlab 2.2.9 and re-installed the package using jupyter labextension install @axlair/jupyterlab_vim. Now it works.

One thing I found confusing: While the extension was not working I was unsure if there was a problem with the installation or if I just didn't know how to enter vim command mode. It would be great if the readme could have something about what it's supposed to look like when it's working.

nro-bot commented 3 years ago

Agreed re:docs! The failure mode = looks exactly like it's not installed.

For me: on updating to jlab 3 this extension stopped working. Fix for me (I used pip to install jupyter) was

rm ~/venv/share/jupyter/lab/settings/*.json
jupyter clean
jupyter build
pip install jupyterlab_vim

It works! Hurray. I was looking under /labextensions and could not find this json, it is under /lab.


Some notes: Upgrading caused a lot of failures. Installed nvm via curl, ran nvm ls-remote and installed latest long term support version with nvm install v14.17.0, jupyter kept complaining (could not run jupyter build), apt remove nodejs, nvm install v14.17.0 (to activate it again?),

jupyter lab clean, pip uninstall, reinstall, jupyter lab extension uninstall --all, etc. I found the discussion: https://discourse.jupyter.org/t/extension-shows-up-as-both-installed-and-uninstalled-and-doesnt-work/2688

Symptom for me was the no matter what on jupyter labextension list this plugin would show up as

JupyterLab v3.0.16
/home/chai/v3/share/jupyter/labextensions
        @axlair/jupyterlab_vim v0.14.2 disabled OK (python, jupyterlab_vim)

Uninstalled core extensions:
    @axlair/jupyterlab_vim
    nbdime-jupyterlab

Disabled extensions:
    @axlair/jupyterlab_vim (all plugins)

Finally after deleting the json, clean, build, pip install, then list extensions shows

(v3) 00:08:41 chai@W530:~/projects/ESimonson$ jupyter labextension list
JupyterLab v3.0.16
/home/chai/v3/share/jupyter/labextensions
        @axlair/jupyterlab_vim v0.14.2 enabled OK (python, jupyterlab_vim)
firai commented 1 year ago

README now contains a recording of the plugin in action. I understand the installation failures noted above have also been resolved. Please reopen or open a new issue if you're still experiencing problems with installation.