1

I've set up auto-complete on emacs to display completion candidates, and it seems to be working well so far. I'm finding the constant display (and changes in display) distracting when I type, and I would like to get auto-complete to show completion candidates only when I press a key, preferably the tab key.

Can this be done? Here's my current configuration (including yasnippet, which I want to respond to the tab keypress first):

(use-package yasnippet
  :ensure t
  :config
    (yas-global-mode 1)
  :pin gnu
)

(use-package auto-complete
  :ensure t
  :config
  (progn
    (require 'auto-complete-config)
    (add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
    (ac-config-default)
    (ac-set-trigger-key "TAB")
    (ac-set-trigger-key "<tab>"))
  :pin melpa
)

This shows completion candidates continuously.

2
(setq ac-auto-start nil)

ac-auto-start

Specify how completion will be started. t means always starting completion automatically. nil means never started automatically. An integer means completion will not be started until the value is more than a length of the completion target string.

It's described in the Auto-Complete User Manual.

  • Thanks -- it works. And thanks for the pointer to the manual. – Rodney Price Jun 3 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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