ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 08 Jan 2015 07:35:12 -0600Navigating autocompletion listhttp://ask.sagemath.org/question/25430/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?Thu, 08 Jan 2015 03:56:58 -0600http://ask.sagemath.org/question/25430/navigating-autocompletion-list/Answer by kcrisman for <p>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.</p>
<p>Example: type <code>cycl</code> and press tab. The list looks like this:</p>
<pre><code>cyclic_permutations
cyclic_permutations_iterator
cyclotomic_cosets
cyclotomic_polynomial
cyclotomic_value
</code></pre>
<p>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 <code>cyclo</code>, then I only have a single navigable function and still can't reach the other two.</p>
<p>Why is that? Is there some configuration setting I could tweak to affect this behavior?</p>
http://ask.sagemath.org/question/25430/navigating-autocompletion-list/?answer=25435#post-id-25435This 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.js](https://github.com/sagemath/sagenb/blob/master/sagenb/data/sage/js/notebook_lib.js) and I bet there is a way to make it better. I've made this https://github.com/sagemath/sagenb/issues/332.Thu, 08 Jan 2015 07:35:12 -0600http://ask.sagemath.org/question/25430/navigating-autocompletion-list/?answer=25435#post-id-25435