 ;; Mac OS
 ;; brew install --HEAD ctags
 ;; brew install global --with-exuberant-ctags
-;; (package-install 'ggtags)
-(require 'ggtags)
-;; (package-install 'helm-gtags)
-(require 'helm-gtags)
+(use-package ggtags
+  :ensure ggtags)
+(use-package helm-gtags
+  :ensure helm-gtags)
 (helm-gtags-mode 1)
 (global-set-key (kbd "M-.") 'helm-gtags-dwim)
 
-;; (package-install 'projectile)
-(require 'projectile)
+(use-package projectile
+  :ensure projectile)
 (projectile-global-mode)
 
 ;; Best way (so far) to search for files in repo.
-;; (package-install 'helm-projectile)
-(require 'helm-projectile)
+(use-package helm-projectile
+  :ensure helm-projectile)
 (global-set-key (kbd "C-x f") 'helm-projectile)
 
 (require 'ediff)

(setq-default indent-tabs-mode nil)

;; Automatically closes brackets.
(unless (fboundp 'smartparens-mode)
  (package-install 'smartparens))
(require '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.

(require 'helm-grep)
(require 'helm-eshell)
(require 'helm-buffers)

(use-package helm-swoop
  :ensure helm-swoop)

(global-set-key (kbd "M-C-s") 'helm-swoop)
(global-set-key (kbd "C-s") 'isearch-forward-regexp)
(global-set-key (kbd "C-r") 'isearch-backward-regexp)
