ac-ispellをリリースしました

ispell/aspellを利用した auto-complete sourceを提供する
ac-ispellをリリースしました

インストール

MELPAからインストールできます.

設定

;; Completion words longer than 4 characters
(custom-set-variable
  '(ac-ispell-requires 4))

(eval-after-load "auto-complete"
  '(progn
      (ac-ispell-setup)))

(add-hook 'git-commit-mode-hook 'ac-ispell-ac-setup)
(add-hook 'mail-mode-hook 'ac-ispell-ac-setup)
(add-hook 'text-mode-hook 'ac-ispell-ac-setup)

ac-ispell-setupで auto-completeの sourceを宣言します.
デフォルトでは 3文字以上で補完を行います. 変更する場合は,
ac-ispell-requiresを変更してください. この変更は ac-ispell-setupより
前に行う必要があるので, custom-set-variableを使って変更するのが良いと
思います.


ac-sourcesへの設定, auto-completeの有効化は, ac-ispell-ac-setupで
行えます. 各モードの hook等で呼び出すようにしてください.

UPCASE, Camelcaseの補完

小文字での補完はもちろんなのですが, ac-ispellでは UPCASE, Camelcaseの
補完に対応しています. 英単語系の補完は小文字のみの対応のものが多かったの
ですが, 文頭にある単語も普通に補完したいということで、そのように実装
しました. 先頭の 2文字が大文字だと UPCASE補完 先頭のみ大文字だと,
Camelcase補完となります.


イメージ

https://github.com/syohex/emacs-ac-ispell/raw/master/image/ac-ispell.png

UPCASE補完

https://github.com/syohex/emacs-ac-ispell/raw/master/image/ac-ispell-upcase.png

Camelcase補完

https://github.com/syohex/emacs-ac-ispell/raw/master/image/ac-ispell-capitalcase.png

おわりに

問題, 提案等ありましたら, githubの issueまでお願いします.