Ask Your Question
2

Navigating autocompletion list

asked 2015-01-08 10:56:58 +0100

MvG gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2015-01-08 14:35:12 +0100

kcrisman gravatar image

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....

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-01-08 10:56:58 +0100

Seen: 501 times

Last updated: Jan 08 '15