lambdalisue / jupyter-vim-binding

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

Native Jupyter Shortcuts Inactivated #36

Closed cyniphile closed 8 years ago

cyniphile commented 8 years ago

In new jupyter notebooks all native jupyter shortcuts are disabled except j and k when in jupyter command mode (not jupyter-vim command mode). In legacy notebooks that I created with ipython notebook, none of the jupyter shortcuts work, even though the jupyter-vim shortcuts work fine.

These problems arise only after I run

%%javascript
Jupyter.utils.load_extensions('vim_binding/vim_binding')
lambdalisue commented 8 years ago

all native jupyter shortcuts are disabled

That what this plugin stands for. This plugin provide Vim-like shortcuts.

cyniphile commented 8 years ago

Ivanov's Vimception keeps both sets of shortcuts which makes it very easy to move between cells and copy/paste/add/delete cells using native jupyter shortcuts and also edit within-cell using vim-like shortcuts.

Currently with my installation of jupyter-vim-bindings, it's not possible to move between cells in old notebooks or copy/paste/add/delete new cells using shortcuts.

lambdalisue commented 8 years ago

Ivanov's Vimception keeps both sets of shortcuts which makes it very easy to move between cells and copy/paste/add/delete cells using native jupyter shortcuts and also edit within-cell using vim-like shortcuts.

While Jupyter provide non Vim flavour key binding. I would like to disable most of default one. For example, in Jupyter

That's why I said "That what this plugin stands for."

Currently with my installation of jupyter-vim-bindings, it's not possible to move between cells in old notebooks or copy/paste/add/delete new cells using shortcuts.

What did you mean with "old notebooks"? jupyter-vim-binding is just a javascript plugin so it won't change any data structure or so on. And jupyter-vim-binding provides different mappings. Use

See mapping help (help > Keyboard shortcut) or https://github.com/lambdalisue/jupyter-vim-binding/blob/master/vim_binding.js#L264-L335