jwkvam / jupyterlab-vim

:neckbeard: Vim notebook cell bindings for JupyterLab
MIT License
973 stars 73 forks source link

Binding for auto-completion #39

Open mdeff opened 6 years ago

mdeff commented 6 years ago

In Jupyter, Python docstrings are shown with Ctrl-Tab, which isn't a convenient shortcut. The vim plugin for Jupyter notebooks maps Ctrl-g to this function and has other bindings for completion. May we have something similar?

jwkvam commented 6 years ago

Yea I've been thinking about those myself. Ctrl-g was implemented in https://github.com/jwkvam/jupyterlab_vim/pull/36 but isn't in a release yet.

Ctrl-n/p completion was a feature I didn't use, but I would like to add it in! I was trying to think about how I can get it to behave like vim. That is:

  1. Ctrl-n/p brings up the completion menu.
  2. Ctrl-n/p cycle through the completion menu and ideally wrap around.

To implement this I think I need understand the completer internals of jupyterlab a bit more. I trust we want to use jupyterlab's completions vs codemirror's completions.

mdeff commented 6 years ago

Great for #36 :+1:

jchutrue commented 6 years ago

What are the autocompletion bindings in the current release since Ctrl-g or Ctrl-n/ Ctrl-p don't work yet? I've tried the default Tab but the completion menu seems to be generated from bash completion, not the variables already defined in my notebook cells.