 (load "~/.emacs.d/my-packages.el")
 
+;;;;;;;;;;;;;;;;
+;; Variables
+
 (setq split-width-threshold 300)
-(global-hl-line-mode +1)
-
 ;Tabs, 4 spaces
 (setq-default indent-tabs-mode nil)
 (setq-default tab-width 4)

             (lambda ()
               (add-hook 'before-save-hook 'web-beautify-css-buffer t t))))

(show-paren-mode 1)
(setq org-log-done t)

(load-library "postack")

(require 'pabbrev)
(global-pabbrev-mode)

(zencoding-mode 1)
(add-hook 'sgml-mode-hook 'zencoding-mode)

(global-linum-mode)

;;To use abbrev-mode, add lines like this:
(add-hook 'php-mode-hook

(add-hook 'js-mode-hook 'flymake-jshint-load)
(add-hook 'php-mode-hook 'flymake-php-load)

(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)


;;;;;;;;;;;;;;;;
;; Keys

(global-set-key (kbd "M-P") 'windmove-up)
(global-set-key (kbd "M-N") 'windmove-down)
(global-set-key (kbd "M-F") 'windmove-right)
(global-set-key (kbd "M-B") 'windmove-left)

(eval-after-load 'js2-mode
  '(define-key js2-mode-map (kbd "C-c b") 'web-beautify-js))
(eval-after-load 'json-mode
  '(define-key json-mode-map (kbd "C-c b") 'web-beautify-js))
(eval-after-load 'sgml-mode
  '(define-key html-mode-map (kbd "C-c b") 'web-beautify-html))
(eval-after-load 'css-mode
  '(define-key css-mode-map (kbd "C-c b") 'web-beautify-css))

;; Can use ~ to return to home dir in ido-find-file
(add-hook 'ido-setup-hook
 (lambda ()
   ;; Go straight home
   (define-key ido-file-completion-map
     (kbd "~")
     (lambda ()
       (interactive)
       (if (looking-back "/")
           (insert "~/")
         (call-interactively 'self-insert-command))))))

(global-set-key
     "\M-x"
