Skip to content

Instantly share code, notes, and snippets.

@yasuyk
Last active December 28, 2015 10:09
Show Gist options
  • Save yasuyk/7484603 to your computer and use it in GitHub Desktop.
Save yasuyk/7484603 to your computer and use it in GitHub Desktop.
English word completion from words file by auto-complete.el
(defun ac-words-dictionary-enable ()
"Add /usr/share/dict/words to `ac-dictionary-files' for this buffer."
(make-local-variable 'ac-dictionary-files)
(add-to-list 'ac-dictionary-files "/usr/share/dict/words" t)
(add-to-list 'ac-sources 'ac-source-dictionary t))
(dolist (hook '(magit-log-edit-mode-hook
git-commit-mode-hook log-edit-mode-hook
textile-mode-hook markdown-mode-hook gfm-mode-hook
org-mode-hook text-mode-hook))
(add-hook hook 'ac-words-dictionary-enable))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment