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

Code completion: 'matplotlib' and '%matplotlib' #3723

Closed
dpsanders opened this issue Jul 22, 2013 · 3 comments
Closed

Code completion: 'matplotlib' and '%matplotlib' #3723

dpsanders opened this issue Jul 22, 2013 · 3 comments
Milestone

Comments

@dpsanders
Copy link
Contributor

From ipython if I do

import matplotlib

mat<TAB>

then the following is shown:

 %matplotlib   matplotlib

but the word I am typing stays at mat instead of completing to matplotlib.

Compare this with

hello1 = 1
hello2 = 2

hel<TAB>

which completes hel to `hello``

The problem seems to be in the %, which is confusing the completer.

This prevents the use of autocompletion for matplotlib in the IPython terminal.
The Notebook has reasonably good behaviour: the first press of TAB brings up a dropdown with the two options, and the second completes matplotlib.

However, it would be better to have the non-magic version shown first, since this is the one that people will almost always want using the following workflow:

%matplotlib   # mat<TAB> correctly completes to %matplotlib
import matplotlib
mat<TAB>   # currently completes first to %matplotlib. Should prefer matplotlib
@dpsanders
Copy link
Contributor Author

I have a found a fix for the relative ordering of %matplotlib and matplotlib, which I will include in a PR to follow.

The fact that the IPython terminal does not complete all of matplotlib is still unsolved.

@Carreau
Copy link
Member

Carreau commented Jul 26, 2013

Taging as wishlist. Meaning that it will be nice but we do not have explicit plan/deadline to work on it.

@dpsanders
Copy link
Contributor Author

I have the fix ready, just need to write the test.

On Fri, Jul 26, 2013 at 8:59 AM, Matthias Bussonnier <
notifications@github.com> wrote:

Taging as wishlist. Meaning that it will be nice but we do not have
explicit plan/deadline to work on it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3723#issuecomment-21630025
.

Dr. David P. Sanders

Profesor Titular "A" / Associate Professor
Departamento de Física, Facultad de Ciencias
Universidad Nacional Autónoma de México (UNAM)

dpsanders@gmail.com
http://sistemas.fciencias.unam.mx/~dsanders

Cubículo / office: #414, 4o. piso del Depto. de Física

Tel.: +52 55 5622 4965

@minrk minrk closed this as completed in 689935c Oct 28, 2013
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Autocompletion: ordering of completions for magic commands and variables with same name

closes ipython#3723
closes ipython#3801
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants