   (add-hook 'c++-mode-hook (lambda () (setq flycheck-clang-language-standard "c++11")))
 
   :ensure t
+  :defer t
 )
 
-;; Tab completion
+;; Autocomplete for words and filenames.  M-/ auto-completes a word
+;; from other words in the buffer and filenames.
+(eval-after-load "dabbrev" '(defalias 'dabbrev-expand 'hippie-expand))
+(setq hippie-expand-try-functions-list
+      '(try-expand-dabbrev
+        try-expand-dabbrev-all-buffers
+        try-expand-dabbrev-from-kill
+        try-complete-file-name-partially
+        try-complete-file-name
+        try-expand-all-abbrevs
+        try-expand-list
+        try-expand-line
+        ))
+
+;; Autocomplete for code
 ;; Company docs: https://company-mode.github.io/
 ;; Company TNG: https://github.com/company-mode/company-mode/issues/526
 (use-package company
   :config
   (company-tng-configure-default)       ; use default configuration
-  (global-company-mode)                 ; enable tab completion in all modes
-  :ensure t
+  (global-company-mode)
+  :ensure t
+  :defer t                              ; lazy loading
   )
 
 ;; Python backend for tab completion

  :ensure t
  )

;; fly-check
;; Intellisense syntax checking
;; http://www.flycheck.org/en/latest/
(use-package flycheck

(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(package-initialize)

;; Bootstrap 'use-package' and enable it
;; http://cachestocaches.com/2015/8/getting-started-use-package/
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))
(eval-when-compile
  (require 'use-package))

