jupyterlab-vim icon indicating copy to clipboard operation
jupyterlab-vim copied to clipboard

Binding for auto-completion

Open mdeff opened this issue 6 years ago • 3 comments

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?

mdeff avatar Apr 09 '18 07:04 mdeff

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.

jwkvam avatar Apr 09 '18 19:04 jwkvam

Great for #36 :+1:

mdeff avatar Apr 09 '18 21:04 mdeff

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.

jchutrue avatar Aug 16 '18 13:08 jchutrue