UNIX & GNU/Linux - Emacs - Auto-completion with Auto-complete

We all agree, without any auto-completion, write always the same functions is really annoying.
A guy named Tomohiro Matsuyama has created an auto-completion plugin, really helpful.

Let's install it together in this tutorial.
First of all, download the latest auto-complete's version.

We have now to extract it:

$ tar xjf auto-complete-1.3.1.tar.bz2

Open a new file with Emacs:

$ emacs badprog

Wihtin, type ALT + X and write load-file.

Type RETURN.

And write it:

~/Downloads/auto-complete-1.3.1/etc/install.el

Type RETURN.

Normally, you would see this wrote on your file:

Successfully installed!

Add the following code to your .emacs:

(add-to-list 'load-path "~/.emacs.d/")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
(ac-config-default)

You have now to write it into the ~/.emacs file.

Then open a file where there is functions and try to write one that already exists, the auto-completion should be present.

Nice job!

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Refresh Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.