jupyterlab-contrib / jupyterlab-vim

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

Sometimes Escape takes me to normal mode, sometimes it doesn't #55

Closed gloryVine closed 2 years ago

gloryVine commented 2 years ago

I'm on Opera on OSX. Usually, when I am in insert mode, I click Escape, and then I get back to normal mode, with the block cursor. I think hitting Escape twice puts my in 'Jupyter normal mode' For some reason, now a single Escape from insert mode puts me in Jupyter normal mode'. I'm working mainly with muscle memory but something is different now, and I can't figure out what went wrong. I tried all of the following: 'Cmd-1, Cmd-2, Cmd-3, Ctrl-1, Ctrl-2, Ctrl-3, Shift-Escape, Escape, Ctrl-[', each from both command mode and from insert mode, but nothing puts me back into Vim normal mode. I also re-started jupyterlab, but this doesn't help either.

Is this a bug? How do I get back into normal mode with the block cursor?

ianhi commented 2 years ago

Hi @gloryVine I think this is the same issue as https://github.com/jupyterlab-contrib/jupyterlab-vim/issues/31

Could you try the workaround that's in the first post in that issue to see if it fixes things?

dtabell commented 2 years ago

@gloryVine I had this same problem recently. Turned out the Jupyter Lab I was using had been updated from v2 to v3, and I needed to reinstall jupyterlab-vim using the instructions for v3.

As I recall, I used pip install jupyterlab-vim, though the top-level ReadMe says pip install jupyterlab_vim (note the - v. _). Have not chased this latter issue.

I discovered, independently, the workaround #31 to which @ianhi points, and that does work. But switching to the v3 install of jupyterlab-vim corrects at least one other issue (DD then P did not work for me), and perhaps others I did not notice.

HTH

ianhi commented 2 years ago

pip install jupyterlabvim (note the - v. ). Have not chased this latter issue.

These are actually equivalent when pip installing. Pip auto substitutes a - in for the _. But I think this has caused confusion before, PRs modifying the readme are very welcome :)

gloryVine commented 2 years ago

Thanks @dtabell and @ianhi. I made sure I have the most recent versions of jupyterlab and jupyterlab_vim. At the moment it works again, and since unfortunately I do not know what causes the problem I can not reproduce it right now. If/when it occurs again I will try the workaround you mentioned.

wiseyoungbuck commented 2 years ago

I am still and forever having this issue. I don't know how we don't have a working VIM plugin for Jupyterlab at this point.

ianhi commented 2 years ago

@wiseyoungbuck I'm going to try to release a version that fixes that this weekend. But in the meantime there is a workaorund: https://github.com/jupyterlab-contrib/jupyterlab-vim/issues/31

ianhi commented 2 years ago

@gloryVine I'm closing this due to the release of 0.15.0 which should have a permanent fix. Feel free to re-open or to open a new issue if you run into this again