How can I make TAB cycle through my command complete choices when using Helm?

289 views Asked by At

When I launch helm, I start typing in a command like org-mo and then I get suggestions for org-mode org-mobile-pull org-mobile-push org-mode-restart and a few other commands.

Let's say I want to get to org-mobile-pull right now I have to use the arrow keys to select it, but I'd rather just press the tab key to cycle down to it, and press S-tab to go back up through the list.

I tried using the configurations here but I get errors with that.

I really don't care if I'm using helm or any other launcher(?) as long as I can tab through the list.

2

There are 2 answers

0
karrot42 On

This is a bit of a cheat, but adding this to my .emacs did the trick

(require 'helm)
(define-key helm-map (kbd "TAB") (lookup-key helm-map (kbd "<down>")))
(define-key helm-map (kbd "<S-tab>") (lookup-key helm-map (kbd "<up>")))
0
Rorschach On

It sounds like you are looking for helm-next-line and helm-previous-line, eg.

(with-eval-after-load 'helm
  (define-key helm-map (kbd "TAB")       #'helm-next-line)
  (define-key helm-map (kbd "<backtab>") #'helm-previous-line))

By default TAB is bound to helm-select-action so you may want to rebind that.