In Visual Studio and Intellij I can press Tab to select the highlighted auto-completion.
In Helm: Is there a way to give Tab the same behavior as Return?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityIn Visual Studio and Intellij I can press Tab to select the highlighted auto-completion.
In Helm: Is there a way to give Tab the same behavior as Return?
You could add this to your init file:
(with-eval-after-load 'helm
(define-key helm-map (kbd "TAB") #'helm-maybe-exit-minibuffer))
This should work in all cases except where a given helm source binds something different than helm-maybe-exit-minibuffer
to RET
, but off the top of my head I can't think of any sources that do.
Note that if you only want to apply this change for a specific source (rather than for all helm sources) you could see if that source has its own associated keymap, and bind it there instead.
#'foo
is shorthand for (function foo)
The docstring for function
says: Like 'quote', but preferred for objects which are functions. In byte compilation, 'function' causes its argument to be compiled. 'quote' cannot do that.
I just watched this video where they show this code to accomplish what you want.
(define-key helm-map (kbd "TAB") 'helm-execute-persistent-action)