Colabtools: Shift + Tab doesn't do docstring lookup

Created on 11 Jan 2018  路  10Comments  路  Source: googlecolab/colabtools

To see docstring lookup, need to execute with ? instead of easier Shift + Tab as it can be done in Jupyter

Most helpful comment

Shouldn't shortcut to access the docstring be uniform?

All 10 comments

In colab, shift+tab does outdent.

We support tab completion, too, in two ways:

  • if you're in a parenthesis or between arguments (eg after a comma), tab will show you the docstring -- so if you are typing something like print('hello', sep=''), then tab after the paren or between the comma and the next arg will show you the docstring.

  • alt+/ will always show (or hide) the docstring.

I'm going to close, but do reopen if either of those aren't working for you at all!

Shouldn't shortcut to access the docstring be uniform?

In colab, shift+tab does outdent.

We support tab completion, too, in two ways:

  • if you're in a parenthesis or between arguments (eg after a comma), tab will show you the docstring -- so if you are typing something like print('hello', sep=''), then tab after the paren or between the comma and the next arg will show you the docstring.
  • alt+/ will always show (or hide) the docstring.

I'm going to close, but do reopen if either of those aren't working for you at all!

alt+/ isn't working.

We're in the process of rolling out a new engine for the code editor, details can be found at https://colab.research.google.com/notebooks/editor_details.ipynb.

In this editor ctrl-shift-space can be used to show the docstring.

Additionally in preferences you can disable automatic completions which will behave more like the previous editor- tab will complete, tab after an open paren will open the docstring. In addition shift-tab will open the docstring, similar to Jupyter Lab.

2020 and:

  • alt + / doesn't work for me
  • shift + tab doesn't work for me

Same for me
2020 and:

alt + / doesn't work for me
shift + tab doesn't work for me

Shift-tab will only work if the 'automatic completions' option is set to 'off' in the settings.

How do I show the docstring? I am used to using shit+tab in jupyter notebooks. I tried turning off "Automatically trigger code completions" in Settings and shift+tab still doesn't work.

ctrl-shift-space is the default for opening the parameter hints, if you are within the brackets of a method invocation.

It would be good to make it work consistently with Jupyter Notebooks. I don't know how this github thing works, but maybe this can be added to a future update.

Was this page helpful?
0 / 5 - 0 ratings