select an offered completion by number? #284
-
Manual section 7.2.7 contains this tantalizing part: bleopt menu_linewise_prefix=' \e[1;32m%2d:\e[m ' I've never used indirect selection but it seems like it might be better than my current habit of typing more until disambiguous (since that's often sort of unknown how much be typed and the file is often visually recognized immediately). But I didn't see anyway to go from these label numbers to selection by number? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Right. Currently, there is no way to select the menu item by numbers. The feature is originally implemented for the general uses of the menu interface, and I haven't initially intended to utilize it for the completion interface. But maybe selecting by numbers is also useful for the completion menu. |
Beta Was this translation helpful? Give feedback.
-
@bkerin I have supported this in commit b91b8bc. You can use M-0...M-9 to start selecting a menu item by its index (immediately after starting the completion or when in the # blerc
for key in {0..9}; do
ble-bind -m emacs -f "$key" 'append-arg enter-menu'
ble-bind -m vi_imap -f "$key" 'append-arg enter-menu'
ble-bind -m menu_complete -f "$key" 'menu/append-arg always'
done I have also added options |
Beta Was this translation helpful? Give feedback.
-
Seems to work great :) I haven't tested default binding as M-number is all window manager for me and it being dwm I have to rebuild to keep it from intercept so a hassle. I didn't search the entire manual for where the binding approach (for key in {0..9} etc.) is mentioned but I wouldn't have known how to bind this without the explicit instructions. |
Beta Was this translation helpful? Give feedback.
@bkerin I have supported this in commit b91b8bc. You can use M-0...M-9 to start selecting a menu item by its index (immediately after starting the completion or when in the
menu-complete
mode). If you would like to also use 0..9 to start the selection by the index, you can use the following settings: