#14552: Tab completer improvements
----------------------------------+-----------------------------------------
Reporter: vbraun | Owner: was
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-5.10
Component: user interface | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Old description:
> Some desirable additions to the tab completer:
> * include `x.foo_bar` in the completion of `x.bar<tab>` (search all
> words after splitting at underscore)
> * Ditto for !CamelCase: Include `RealField` in `Field<tab>`
> * All-caps as shortcut for !CamelCase: `AMPD<tab>` should yield
> `AtkinModularPolynomialDatabase`
> * Turn on IPython's greedy completion (completion of lists):
> `lst[0].<tab>` shows the methods of `lst[0]`
New description:
Some desirable additions to the tab completer:
1. include `x.foo_bar` in the completion of `x.bar<tab>` (search all
words after splitting at underscore)
1. Ditto for !CamelCase: Include `RealField` in `Field<tab>`
1. All-caps as shortcut for !CamelCase: `AMPD<tab>` should yield
`AtkinModularPolynomialDatabase`
1. Turn on IPython's greedy completion (completion of lists):
`lst[0].<tab>` shows the methods of `lst[0]`
--
Comment (by vbraun):
Number 3 shouldn't cause any namespace issues. The first one was a request
by David Roe on #14548 since English places adjectives first whereas you
might use tab completion looking for the subsequent noun.
In any case, its hard to judge from the outset if it'll be too much.
Perhaps the additional completions should only shown if the list of actual
completions is very short. It would be nice to have a prototype
implementation to try it out.
Number 4 you can do already on-the-fly with
{{{
sage: get_ipython().Completer.greedy = True
}}}
It just needs to be integrated into `sage.misc.sage_extension`.
For the others you should read the `IPython/core/completer.py` source.
You'd probably have to write a derived `class SageCompleter(Completer)`.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14552#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.