 ;; Keep cursor away from edges when scrolling up/down
 (use-package smooth-scrolling :disabled t)
 
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Backups
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar backup-dir "~/.emacs.d/backups/")
 (setq backup-directory-alist
-      `(("." . ,(expand-file-name
-                 (concat user-emacs-directory "backups"))))
+      `(("." . ,(expand-file-name "backups" user-emacs-directory)))
       backup-by-copying t
       delete-old-versions t
       make-backup-files t
       kept-new-versions 6
       kept-old-versions 2
-      version-control t)
-
-;; Make backups of files, even when they're in version control
-(setq vc-make-backup-files t)
-
-
-;; autsave no longer puts it in my working directory
-(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
-
+      version-control t
+
+      ;; Make backups of files, even when they're in version control
+      vc-make-backup-files t
+
+      ;; autsave no longer puts it in my working directory
+      auto-save-file-name-transforms `((".*" ,temporary-file-directory t))
+      )
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Autocomplete

    (defadvice make-frame (around toggle-nlinum-mode compile activate)
      (nlinum-mode -1) ad-do-it (nlinum-mode 1)))
  )
(setq-default truncate-lines t) ;; disables line wrapping
(add-hook 'before-save-hook 'delete-trailing-whitespace)


  (setq-default
   company-backends '((company-capf company-dabbrev-code) company-dabbrev))

  (setq
   company-idle-delay 0.2
   completion-cycling 5
   company-selection-wrap-around t
   company-tooltip-align-annotations t
   company-auto-complete nil)

  (define-key evil-insert-state-map (kbd "M-n") 'company-complete-common)
  (evil-define-key 'hybrid company-active-map
    (kbd "TAB") 'company-complete
    (kbd "M-n") 'company-select-next
    (kbd "M-p") 'company-select-previous))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Snippets
