14
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Emacsでauto-complete-modeを使う

Posted at

便利だとはわかってるけど「なんかめんどくせーなー。」と思ってたauto-complete.elを入れたメモ。

環境はWindowsだけど、.emacs.dをMac, Mint, Ubuntuで共有してます。

インストール方法

git clone https://github.com/auto-complete/auto-complete.git
git clone https://github.com/auto-complete/popup-el.git
mklink /J ~\.emacs.d\site-lisp\auto-complete ~\.emacs.d\git\auto-complete

こっちは管理者権限で。

mklink popup.el ~\.emacs.d\git\popup-el\popup.el

んで、自動読込するように設定

~/.emacs.d/inits/30-auto-comlete.el
(require 'auto-complete)
(require 'auto-complete-config)
(global-auto-complete-mode t)

ツールバーにACと表示されてたらインストールは完了

使い方

標準でバッファ内にある文字列を自動的に補完対象にしてくれるので
例えばさっきの設定ファイル内でauなどと打つと補完候補が表示される。

補完候補が表示されてる時にTABを押すと選択、もう一個したを選択したいときはもう一度TABを押すか十字キーで選択。

後はエンターキーで確定。

参考

「Emacsのトラノマキ」連載第09回「auto-completeを使おう」(松山智大) | ありえるえりあ

14
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?