 
 ;; No more yes and no and y and n inconsistencies
 (fset 'yes-or-no-p 'y-or-n-p)
+
+;; Automatically wrap overly long lines for all text modes
+(add-hook 'text-mode-hook #'(lambda () (auto-fill-mode t)))
+
+;; Turn on linum mode for all prog and text modes
+(dolist (hook '(prog-mode-hook text-mode-hook))
+  (add-hook hook #'(lambda () (linum-mode t))))
+;; Renumber the current buffer after reverting the buffer
+(add-hook 'after-revert-hook 'linum-update-current)
 
 ;; More sensible comment-dwim
 (defun comment-dwim-line-or-region (&optional arg)


;; Use ido with M-x
(use-package smex
  :config (progn
            (smex-initialize)
            (global-set-key (kbd "M-x") 'smex)
            (global-set-key (kbd "M-X") 'smex-major-mode-commands)))

;; Use ido for even more things than ido-everywhere
(use-package ido-ubiquitous)

         ("M--" . er/contract-region)))

(use-package smartparens-config
  :bind (("M-A"       . sp-beginning-of-sexp)
         ("M-E"       . sp-end-of-sexp)
         ("M-_"       . sp-unwrap-sexp)
         ("C-<left>"  . sp-backward-slurp-sexp)
         ("M-<left>"  . sp-backward-barf-sexp)
         ("C-<right>" . sp-forward-slurp-sexp)
         ("M-<right>" . sp-forward-barf-sexp)))

