 
 ;; 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)))
+  :bind (("M-x" . smex)
+         ("M-X" . smex-major-mode-commands))
+  :config (smex-initialize))
 
 ;; 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)))



;; yasnippet
(use-package yasnippet
  :bind (:map yas-minor-mode-map
              ("TAB"   . nil)
              ("<tab>" . nil)
              ("C-c i" . yas-expand))
  :config (dolist (hook '(prog-mode-hook text-mode))
            (add-hook hook 'yas-minor-mode)
            (yas-reload-all)))

;; Window management
(use-package golden-ratio
