Skip to content

Instantly share code, notes, and snippets.

@hiredman
Created March 11, 2010 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiredman/328680 to your computer and use it in GitHub Desktop.
Save hiredman/328680 to your computer and use it in GitHub Desktop.
(load-file "~/.emacs.d/auto-complete.el")
(load-file "~/.emacs.d/auto-complete-config.el")
(require 'auto-complete)
(require 'auto-complete-config)
(global-auto-complete-mode t)
; Sample configuration:
; Here is my configuration. It is useful for many people.
(setq-default ac-sources '(ac-source-words-in-same-mode-buffers))
(add-hook 'emacs-lisp-mode-hook
(lambda () (add-to-list 'ac-sources 'ac-source-symbols)))
(add-hook 'auto-complete-mode-hook
(lambda () (add-to-list 'ac-sources 'ac-source-filename)))
(global-auto-complete-mode t)
(set-face-background 'ac-candidate-face "lightgray")
(set-face-underline 'ac-candidate-face "darkgray")
(set-face-background 'ac-selection-face "steelblue")
(define-key ac-completing-map "\M-n" 'ac-next)
(define-key ac-completing-map "\M-p" 'ac-previous)
(setq ac-auto-start 2)
(setq ac-dwim t)
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
(define-key read-expression-map [(tab)] 'hippie-expand)
(define-key read-expression-map [(shift tab)] 'unexpand)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment