       (buffer-disable-undo)
       (fundamental-mode))))
 (add-hook 'find-file-hook #'doom|check-large-file)
+
+
+;;
+;; Built-in plugins
+;;
+
+;; revert buffers for changed files
+(global-auto-revert-mode 1)
+(setq auto-revert-verbose nil)
+
+;; enabled by default in Emacs 25+. No thanks.
+(electric-indent-mode -1)
+
+;; savehist / saveplace
+(setq savehist-file (concat doom-cache-dir "savehist")
+      savehist-save-minibuffer-hisstory t
+      savehist-autosave-interval nil ; save on kill only
+      savehist-additional-variables '(kill-ring search-ring regexp-search-ring)
+      save-place-file (concat doom-cache-dir "saveplace"))
+(add-hook! 'after-init-hook #'(savehist-mode save-place-mode))
+
+;; Keep track of recently opened files
+(def-package! recentf
+  :defer 1
+  :config
+  (setq recentf-save-file (concat doom-cache-dir "recentf")
+        recentf-exclude (list "/tmp/" "/ssh:" "\\.?ido\\.last$" "\\.revive$" "/TAGS$"
+                              "^/var/folders/.+$" doom-local-dir)
+        recentf-max-menu-items 0
+        recentf-max-saved-items 250
+        recentf-filename-handlers '(abbreviate-file-name))
+  (quiet! (recentf-mode 1)))
 
 
 ;;

  (add-hook! 'editorconfig-custom-hooks
    (if indent-tabs-mode (whitespace-mode +1))))

;; NOTE I've extracted some of savehist/saveplace's init code into def-package
;; blocks so that they can benefit from deferred loading.

;; persistent history
(def-package! savehist
  :commands (savehist-minibuffer-hook savehist-autosave)
  :init
  (add-hook 'minibuffer-setup-hook #'savehist-minibuffer-hook)
  (add-hook 'kill-emacs-hook #'savehist-autosave)
  :config
  (setq savehist-file (concat doom-cache-dir "savehist")
        savehist-save-minibuffer-history t
        savehist-autosave-interval nil ; save on kill only
        savehist-additional-variables '(kill-ring search-ring regexp-search-ring))
  (savehist-mode 1))

;; persistent point
(def-package! saveplace
  :commands (save-place-find-file-hook save-place-dired-hook save-place-kill-emacs-hook save-place-to-alist)
  :init
  (add-hook 'find-file-hook #'save-place-find-file-hook t)
  (add-hook 'dired-initial-position-hook #'save-place-dired-hook)
  (add-hook 'kill-buffer-hook #'save-place-to-alist)
  (unless noninteractive
    (add-hook 'kill-emacs-hook #'save-place-kill-emacs-hook))
  :config
  (setq save-place-file (concat doom-cache-dir "saveplace"))
  (save-place-mode +1))

;; Auto-close delimiters and blocks as you type
(def-package! smartparens :demand t
  :init
  (setq sp-autowrap-region nil ; let evil-surround handle this
        sp-highlight-pair-overlay nil

 delete-trailing-lines nil
 fill-column 80
 sentence-end-double-space nil
 word-wrap t
 ;; Scrolling
 hscroll-margin 1
 hscroll-step 1
