I switched from sublime text to emacs a while back, and while I feel emacs is much nicer, its autocompletion is really lacking in responsiveness. I went and customized company so that it would try to complete after two characters had been typed and so the delay was only 0.1s, but it doesn't show up half the time and when it does, it's really not useful. Has anyone else had success in getting company to be as responsive as sublime/visual studio/eclipse? Any other IDE really.

  • 2
    Which language are you working with?
    – abo-abo
    Nov 11, 2015 at 9:46
  • Have you tried auto-complete? I customize it without problem, the user manual is really comprehensive. Nov 11, 2015 at 9:54
  • 1
    I suggest you make an actual M-x report-emacs-bug with reproducible recipes.
    – Stefan
    Nov 11, 2015 at 15:29

1 Answer 1


I had also a bad experience with company at the beginning, but in my setup I just put these lines.

(setq company-dabbrev-downcase 0)
(setq company-idle-delay 0)

The first variable is used to skip the downcase that company does to the variables I autocomplete, the second one I think you already have.

(defun tab-indent-or-complete ()
  (if (minibufferp)
    (if (or (not yas-minor-mode)
            (null (do-yas-expand)))
        (if (check-expansion)

(global-set-key [backtab] 'tab-indent-or-complete)

Also these lines are useful to trigger the completion pressing the key you want.

  • Appreciate it, but I kinda switched off emacs now :p. I still use the keybindings though.
    – m0meni
    Jun 13, 2016 at 15:44
  • 5
    "(setq company-idle-delay 0)" Don't do that, you're wasting a lot of CPU clocks this way.
    – Dmitry
    Jun 13, 2016 at 16:02
  • I get "Symbol’s value as variable is void: do-yas-expand" when using your tab-indent-or-complete function. Aug 24, 2018 at 16:29
  • @Dmitry How so?
    – NPN328
    Sep 2, 2020 at 9:04
  • If you're polling backends right after every keypress, whenever you don't get back responses fast enough, that background processing simply goes to waste.
    – Dmitry
    Sep 2, 2020 at 13:46

Your Answer

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

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