8

I am brand new to using Emacs and I love it. I tried Spacemacs to see the functionality it provided out of the box and I want to replicate some of those features in my own Emacs configuration. From what I can see Spacemacs uses Helm and allows tab completion inside Helm. How does it do that? Does it even use Helm? If not what does it use?

1
  • The question is a bit broad, but you might get some useful help. Have you tried looking at some of the Spacemacs code, e.g., searching for "helm"?
    – Drew
    Jun 23, 2017 at 13:35

2 Answers 2

11

The "tab completion" that spacemacs does in helm is actually the helm command helm-execute-persistent-action. By default helm-execute-persistent-action is bound to C-z and TAB is bound to helm-select-action, but in spacemacs these bindings are switched.

You can switch these bindings in your init.el by adding these lines of elisp

(define-key helm-map (kbd "TAB") #'helm-execute-persistent-action)
(define-key helm-map (kbd "<tab>") #'helm-execute-persistent-action)
(define-key helm-map (kbd "C-z") #'helm-select-action)
-1

Tab completion inside of Helm should come pre-loaded with Helm. It shouldn't need to be configured.

Tab completion outside that uses helm sometimes needs to be configured.

Many packages come with their own helm completion modules. For example helm-c-yasnippet aggregrates yasnippets for Helm.

Helm makes it very easy to add more sources as well.

Spacemacs also uses company/autocomplete, which is the in-buffer drop down like menu. It is similar to helm. Maybe take a look at the auto completion layer.

EDIT: My bad this entire post is wrong. I was not aware that tab-completion was a separate function, I thought it was being referred to as justing hitting tab and auto-completion occuring.

1
  • The TAB key does not complete by default for me. It calls helm-select-action which switches to a list of action (for acting on selected files).
    – YoungFrog
    Oct 25, 2017 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.