# Navigating autocompletion list

When I enter the beginning of a function name in the sage notebook and press tab, I get a list of possible completions. The first few of these can be navigated using arrow keys, for the rest I apparently have to use the mouse.

Example: type cycl and press tab. The list looks like this:

cyclic_permutations
cyclic_permutations_iterator
cyclotomic_cosets

cyclotomic_polynomial
cyclotomic_value


The first three can be navigated using the arrow keys, the latter three can not. When I add one more letter, turning the input into cyclo, then I only have a single navigable function and still can't reach the other two.

Why is that? Is there some configuration setting I could tweak to affect this behavior?

edit retag close merge delete

Sort by » oldest newest most voted

This is a little tricky; I have always been able to do it by trial and error, but now I figured out the pattern.

Imagine this as not a list, but a table. Instead of

cyclic_permutations
cyclic_permutations_iterator
cyclotomic_cosets

cyclotomic_polynomial
cyclotomic_value


Think

cyclic_permutations                    cyclotomic_polynomial
cyclic_permutations_iterator           cyclotomic_value
cyclotomic_cosets


So the up/down arrows navigate only within their column, and the right/left arrows only function if you are in a row with more than one item. (Or maybe you can get from the end of one row to the end of the next, but anyway the left/right arrows are the ticket.)

This may be possible to make more obvious with some kind of reformatting. This is all handled in the function handle_introspection in sagenb/data/sage/js/notebook_lib.jsand I bet there is a way to make it better. I've made this https://github.com/sagemath/sagenb/is....

more