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

Conflicting Shortcuts with new JupyterLab 3.0.6 #26

Closed davibarreira closed 3 years ago

davibarreira commented 3 years ago

There seem the be a conflicting shortcut with the new JupyterLab. This new version comes with a shortcut for the escape button, that once pressed, goes to the Cell Mode, instead of going from Vim Insert Mode to Vim Edit Mode.

davibarreira commented 3 years ago

There is a quick fix for this. Just add this to your shortcut setting:

{"shortcuts": [{"command": "notebook:enter-command-mode",
            "keys": [
                "Escape"
            ],
            "selector": ".jp-Notebook.jp-mod-editMode",
            "disabled": true}]
}
willprice commented 3 years ago

I just ran into this now. Any chance this shortcut can be added on installation? It would be a good idea to add this to the README, or a message printed on install for jupyter versions affected. Thanks @axelfahy for keeping the vim extension going!

axelfahy commented 3 years ago

I am sorry, but I am not able to reproduce. What browser do you use? How did you install the plugin? Did you refresh the page after installing the plugin? Does it only occur with the 3.0.6 version?

ianhi commented 3 years ago

I sometimes run into this and have found that after refreshing the page the issue resolves. The thing is that esc has always been a jlab shortcut, so maybe switching to pre-built extensions is having weird inconsistent effects on the order of shortcut definitions. Though I think that that would a be a jlab issue

willprice commented 3 years ago

Hi @axelfahy, I'm on jupyterlab 3.0.7 with the plugin version 0.13.0 installed via pip using firefox on linux. I've hard refreshed multiple times and it seems to persist unless I add that workaround listed in 2nd post in this thread.

ianhi commented 3 years ago

@willprice I'm using firefox on linux with jlab 3.0.9 and found that the issue mostly arises immediately after I build. Can you try running jupyter lab build then refreshing? Also, any change you can post a set of commands (making new env etc) that replicates the issue?