 (setq-default indent-tabs-mode nil)
 
 ;; Automatically closes brackets.
-(unless (fboundp 'smartparens-mode)
-  (package-install 'smartparens))
-(require 'smartparens)
+(use-package smartparens
+  :ensure smartparens)
 (smartparens-global-mode)
 (show-smartparens-global-mode +1)
 (electric-indent-mode)
 
 ;; Partially use path in buffer name.
-(require 'uniquify)
 (setq uniquify-buffer-name-style 'forward)
 
 ;; Get rid of splash screens.

(set-face-attribute 'linum nil :background "#333333")
(set-face-attribute 'fringe nil :background "#333333")

;; (package-install 'ido-vertical-mode)
(ido-vertical-mode)

;; (package-install 'markdown-mode+)
(autoload 'markdown-mode "markdown-mode"
  "Major mode for editing Markdown files" t)
(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))

(bind-key "M-t M-t" 'transpose-words)
(bind-key "M-t s" 'transpose-sexps)

(use-package rainbow-delimiters
  :ensure rainbow-delimiters)
(global-rainbow-delimiters-mode)

(use-package hungry-delete
  :ensure hungry-delete)
(global-hungry-delete-mode)
(global-auto-revert-mode)
(global-font-lock-mode)

(use-package expand-region
  :ensure expand-region)
(global-set-key (kbd "C-c w") 'er/expand-region)

(use-package helm
  :ensure helm)

;; From http://tuhdo.github.io/helm-intro.html
;; must set before helm-config,  otherwise helm use default
