 
 (package-initialize)
 
+(unless package-archive-contents
+  (package-refresh-contents))
+
+;; use-package allows for cleaner configuration of packages
+(unless (package-installed-p 'use-package)
+  (package-install 'use-package))
+
+(require 'use-package)
+
+;; Causes use-package function to install packages not yet installed. Useful
+;; when running this init.el on a system for the first time.
+(setq use-package-always-ensure t)
+
 ;;; -----------
 ;;; Look & feel
 ;;; -----------
 
 (setq inhibit-startup-message t)
-(setq visual-bell t)
+(setq visible-bell t)
 
 (scroll-bar-mode -1) ; Disable visible scrollbar
 (tool-bar-mode -1) ; Disable the toolbar


;; Currently commented out as I rebuild my configuration.

; (require 'org)
; (define-key global-map "\C-cl" 'org-store-link)
; (define-key global-map "\C-ca" 'org-agenda)
; (setq org-log-done t)
; (setq org-agenda-files (list "~/memex/OrgTutorial.org"))


(load-theme 'leuven t)

;; disable arrow keys so I am forced to learn navigating using C-p C-n C-f and
;; C-b
(global-unset-key (kbd "<left>"))
(global-unset-key (kbd "<right>"))
(global-unset-key (kbd "<up>"))
(global-unset-key (kbd "<down>"))

;; Most of my code and documents should wrap at 80 columns.
(set-fill-column 80)

;;; ---------
;;; Evil-mode
;;; ---------

(use-package evil
  :config
  (evil-mode 1))

;;; --------
;;; Ido-mode
;;; --------

;; Not sure whether to use helm, ivy or ido. Going with ido for now due to its
;; position as a built-in.

(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(ido-mode 1)

;;; --------
;;; Org-mode
