Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autocompletion in "from package import <tab>" #3653

Closed
mqlaql opened this issue Jul 16, 2013 · 4 comments
Closed

autocompletion in "from package import <tab>" #3653

mqlaql opened this issue Jul 16, 2013 · 4 comments

Comments

@mqlaql
Copy link

mqlaql commented Jul 16, 2013

This is a small feature request.

In the Ipython notebook when I type sk <tab>, Ipython autocompletes sklearn. That is very useful. However, when I type from sklearn import <tab>, it shows an empty pop up with the text <empty docstring> .

In my opinion, it would be really useful to get the list of objects associated to the referred package. In this example, that would be sklearn.__check_build, sklearn._build_utils, sklearn._hmmc, etc.

@minrk
Copy link
Member

minrk commented Jul 16, 2013

terminal IPython already does this, so it shouldn't take much to fix the notebook to make a proper completion request.

@Carreau
Copy link
Member

Carreau commented Sep 27, 2013

Ok, got a way to get around that, but it is not easy if we don't want to add python assumption in it.

The issue is that "tab" has been weaponize and that we need to "guess" wether one want to complete or tooltip.
Right now if the cursor is preceded by space or '(' we invoke tooltip.

foo( param1, <tab> will get help on foo(

Otherwise, completer is invoked.

I can special case import <tab> to complete, but it is python specific.
You could also in custom.js set IPython.config.tooltip_on_tab = false and use Shit-Tab to trigger tooltip (this should also work if you select text and press shift tab, it will trigger help on selection).

In any case, I'm not sure there is a really perfect way to deal with that. But we might have to in any case separate complete from tooltip as language like julia will more likely need more complex heuristic in the kernel where we cannot decide on frontend what to do.

Carreau added a commit to Carreau/ipython that referenced this issue Oct 6, 2013
Some configurability for Julia
(change the regexp because ! is a valid char in token from them)
@ellisonbg
Copy link
Member

@Carreau what is the status of this?

@ellisonbg
Copy link
Member

This is fixed in master, closing.

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Some configurability for Julia
(change the regexp because ! is a valid char in token from them)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants