Boris Stitnicky
Boris Stitnicky

Reputation: 12578

How to turn on the Autocomplete mode in irb mode?

I have configured AutoComplete to help me when writing Ruby programs, but in irb window, it is off. How do I turn it on and keep it that way in subsequent Emacs starts?

Upvotes: 2

Views: 656

Answers (1)

Alex Ott
Alex Ott

Reputation: 87069

Put in your config something like:

 (defun my-inf-ruby-mode-hook ()
    (set (make-local-variable 'ac-auto-start) 2)
    (set (make-local-variable 'ac-auto-show-menu) t)
   )
 (add-hook 'inf-ruby-mode-hook 'my-inf-ruby-mode-hook)

And I think, that you'll also need to setup ac-sources variable in this hook, so it will use ruby dictionaries...

Upvotes: 2

Related Questions