lambdalisue / jupyter-vim-binding

Jupyter meets Vim. Vimmer will fall in love.
2.1k stars 136 forks source link

Escape defaults to exiting to "cell" scope #38

Closed li-dennis closed 8 years ago

li-dennis commented 8 years ago

Hey!

I'm really enjoying this plugin so far, but it feels a bit unintuitive to me that hitting escape defaults to exiting to the cell-scope (if that makes sense), rather than just going to normal mode. My workflow tends to be normal mode -> insert mode -> back to normal mode. So for me, escape should escape out of insert mode -> normal mode. And then if it's pressed again, escape from normal mode -> cell scope.

I tried to fix this by simply removing the escape binding, which seems to have worked, but I'm not really sure what I'm doing :)

https://github.com/dennisli92/jupyter-vim-binding/commit/71b7f3cf520b1dc85ea0c96e7206dbb7a368298e

lambdalisue commented 8 years ago

The expected behavior is

Behavior

So what you said seems unexpected behavior. Let me know the detail (Version of Jupyter, jupyter-vim-binding, browser, OS, and detailed procedure of reproduce the phenomenon).

EntilZha commented 8 years ago

I am getting the same thing when I just tried this out for the first time. This is on Mac OS X, Chrome, Jupyter 4.0.6, and most recent version of jupyter-vim-binding.

Reproduce steps:

  1. Open notebook, click on cell to get command mode cursor.
  2. Type i to go to insert mode
  3. Type escape which goes to jupyter mode (instead of command mode).

Let me know if you can't reproduce and can figure out what is wrong since I would be interested in this working correctly

li-dennis commented 8 years ago

Sorry about the delay! I was going to get around to responding to this, but then the holidays came up. Anyway, this is odd, I can no longer replicate the issue. But I can still give you info on what my setup was at the time:

  1. I was running OSX Yosemite (I recently upgraded to El Captain between when this behavior first appeared and now)
  2. Chrome
  3. Jupyter 4.0.6
  4. jupyter-vim-binding as of https://github.com/lambdalisue/jupyter-vim-binding/commit/fbb5b670e73252406e2cd10b75819f9b4cd85eec

The steps to reproduce were similar to those of @EntilZha

EntilZha commented 8 years ago

I will give a shot to rebooting/upgrading everything to most recent version and see if that works. Might be something as simple as that

EntilZha commented 8 years ago

Rebooted, did pip install -U jupyter to make sure I was at latest, but still have the same problem

EntilZha commented 8 years ago

Just tried this in incognito mode and the problem isn't present. I tested disabling Vimium for the ipython notebook url patterns and the problem goes away.

Might be worth putting this in FAQ, since I am guessing many users of jupyter-vim-binding are the same type of users that Vimium attracts

lambdalisue commented 8 years ago

Thanks @EntilZha

Just tried this in incognito mode and the problem isn't present. I tested disabling Vimium for the ipython notebook url patterns and the problem goes away.

I see. How about @dennisli92

li-dennis commented 8 years ago

Ah. I think vimium was causing the issue for me as well. I was able to replicate it by removing the vimium rule to ignore ipython notebooks.

I guess I added ipython to Vimium block list around the same time I tried some other fixes :)

BenSYZ commented 4 years ago

The expected behavior is

Behavior

So what you said seems unexpected behavior. Let me know the detail (Version of Jupyter, jupyter-vim-binding, browser, OS, and detailed procedure of reproduce the phenomenon).

I wonder why I cannnot go from Command mode to Jupyter mode with <esc>. If I disable the extension, noteboolk works well. Could you here me to figure it out?