 (setq solarized-termcolors 256)
 (add-to-list 'default-frame-alist '(background-mode . dark))
 
-(define-key global-map (kbd "C-+") 'text-scale-increase)
-(define-key global-map (kbd "C--") 'text-scale-decrease)
-(blink-cursor-mode 0)
-
-;; http://ergoemacs.org/emacs/emacs_make_modern.html
-(global-linum-mode 1)
-(column-number-mode 1)
-
-;; Commenting
-(global-set-key "\C-c;" 'comment-region)
-(global-set-key "\C-c:" 'uncomment-region)
-
-;; select all
-(global-set-key "\C-x\C-a" 'mark-whole-buffer)
-(global-unset-key "\C-xh")
-
-;; Kill whitespace
-(add-hook 'before-save-hook 'delete-trailing-whitespace)
-
-;; Add new lines automatically
-(setq next-line-add-newlines t)
-
-;; Faster redrawing
-(setq redisplay-dont-pause nil)
-
-;; Tabs (no)
-(setq-default indent-tabs-mode nil)
-
-(require 'ido)
-(ido-mode t)
-
-;; Auto fill mode
-;; (add-hook 'text-mode-hook 'turn-on-auto-fill)
-(add-hook 'tex-mode-hook 'turn-on-auto-fill)
-(add-hook 'markdown-mode-hook 'turn-on-auto-fill)
-
-;; magit
-;; brew install magit
-(require 'magit)
-(global-set-key (kbd "C-x g") 'magit-status)
-(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup)
-(setq magit-last-seen-setup-instructions "1.4.0")
-
-;; editorconfig
+(setq-default ispell-program-name "aspell")
+(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
+(autoload 'flyspell-delay-command "flyspell" "Delay on command." t)
+(autoload 'tex-mode-flyspell-verify "flyspell" "" t)
+
 ;; needs its hand held with a special load-path
 (add-to-list 'load-path "/usr/local/opt/editorconfig-emacs/share/emacs/site-lisp/editorconfig-emacs")
 (load "editorconfig")
 
-;; Better Meta
 (require 'smex)
 (setq mac-option-modifier 'meta)
 (global-set-key (kbd "M-x") 'smex)

(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(add-hook 'org-mode-hook 'turn-on-flyspell 'append)

;; table mode
(require 'table)
(add-hook 'text-mode-hook 'table-recognize)
(add-hook 'markdown-mode-hook 'table-recognize)

;; Mail mode
(add-to-list 'auto-mode-alist '("/mutt" . mail-mode))
(add-hook 'mail-mode-hook 'turn-on-auto-fill)

;; git-modes
(require 'gitattributes-mode)

               ac-source-html-tag
               ac-source-html-attribute)))

;; installed --with-markdown-plus
(require 'markdown-mode)
(require 'markdown-mode+)
(add-to-list 'auto-mode-alist '("\\.markdown$" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.mdown$" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))

(require 'fountain-mode)
(add-to-list 'auto-mode-alist '("\\.fountain$" . fountain-mode))

(require 'scss-mode)
(add-to-list 'auto-mode-alist '("\\.scss$" . scss-mode))
(add-to-list 'auto-mode-alist '("\\.sass$" . scss-mode))

(require 'rainbow-mode)
(add-hook 'scss-mode-hook 'scss-rainbow-hook)
(defun scss-rainbow-hook ()
  "Colorize color strings."
  (rainbow-mode 1))

(require 'php-mode)
(add-to-list 'auto-mode-alist '("\\.php$" . php-mode))

(require 'js2-mode)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
(add-to-list 'interpreter-mode-alist '("node" . js2-mode))
(add-to-list 'interpreter-mode-alist '("iojs" . js2-mode))

(require 'flycheck)
(add-hook 'after-init-hook #'global-flycheck-mode)

