 (add-hook 'text-mode-hook 'flyspell-mode)
 
 ;; tramp-mode
-(setq tramp-auto-save-directory "~/.emacs.d/auto-save-list"
-      tramp-completion-reread-directory-timeout nil
-      tramp-connection-timeout 30
-      tramp-default-host "localhost"
-      tramp-default-method "scp")
+;; (setq tramp-auto-save-directory "~/.emacs.d/auto-save-list"
+;;       tramp-completion-reread-directory-timeout nil
+;;       tramp-connection-timeout 30
+;;       tramp-default-host "localhost"
+;;       tramp-default-method "scp")
 
 ;; web-beautify mode
-(when (eq system-type 'darwin)
-  (setenv "PATH" (concat "/usr/local/bin:" (getenv "PATH"))))
-(eval-after-load 'js2-mode
-  '(define-key js2-mode-map (kbd "C-c w") 'web-beautify-js))
-(eval-after-load 'json-mode
-  '(define-key json-mode-map (kbd "C-c w") 'web-beautify-js))
-(eval-after-load 'sgml-mode
-  '(define-key html-mode-map (kbd "C-c w") 'web-beautify-html))
-(eval-after-load 'css-mode
-  '(define-key css-mode-map (kbd "C-c w") 'web-beautify-css))
+;; (when (eq system-type 'darwin)
+;;   (setenv "PATH" (concat "/usr/local/bin:" (getenv "PATH"))))
+;; (eval-after-load 'js2-mode
+;;   '(define-key js2-mode-map (kbd "C-c w") 'web-beautify-js))
+;; (eval-after-load 'json-mode
+;;   '(define-key json-mode-map (kbd "C-c w") 'web-beautify-js))
+;; (eval-after-load 'sgml-mode
+;;   '(define-key html-mode-map (kbd "C-c w") 'web-beautify-html))
+;; (eval-after-load 'css-mode
+;;   '(define-key css-mode-map (kbd "C-c w") 'web-beautify-css))
 
 ;; type over a region
 (pending-delete-mode t)

(add-hook 'magit-log-edit-mode-hook 'flyspell-mode)

;; org-mode
(setq org-agenda-files `("~/Notes/todo.org" "~/Notes/work.org")
      org-agenda-timegrid-use-ampm 1 ;; 12hr format for agenda view
      org-default-notes-file "~/Notes/todo.org"
      org-directory "~/Notes"
      org-log-done 'time
      org-return-follows-link t
      org-src-fontify-natively t
      org-startup-folded nil
      org-capture-templates
      '(("t" "Add personal todo" entry (file+headline "~/Notes/todo.org" "Tasks")
         "* TODO %?\n  %i"
         :kill-buffer t
         :empty-lines 1)

        ("w" "Add a work todo" entry (file+headline "~/Notes/work.org" "Tasks")
         "* TODO %?\n  %i"
         :kill-buffer t)

        ("r" "Refile" plain (file "~/Notes/refile.org")
         "%?\n %i"
         :kill-buffer t)

        ("j" "Journal" plain (file (format "%s%s.org" "~/Notes/Journal/"
                                           (format-time-string "%d %m %Y")))
         "%U\n\n%?%i"
         :kill-buffer t
         :unnarrowed t
         )))

(global-set-key (kbd "C-c a") 'org-agenda)
(global-set-key (kbd "C-c r") 'org-capture)
;; org-indent is messing up layout once in a while.
;; (add-hook 'org-mode-hook 'org-indent-mode)

;; org-present mode
(defvar org-present-text-scale 10)
(add-hook 'org-present-mode-hook (lambda ()
                                   (linum-mode -1)
                                   (org-present-big)
                                   (org-display-inline-images)))

(add-hook 'org-present-mode-quit-hook (lambda ()
                                        (linum-mode t)
                                        (org-present-small)
                                        (org-remove-inline-images)))

;; Projectile mode
(projectile-global-mode)
(setq projectile-mode-line
      (quote (:eval (format " [ρ %s]" (projectile-project-name)))))


;; Python mode

  (read-only-mode t))

;; server-mode
;; (unless (server-running-p)
;;   (server-start))

;; show parentheses
(show-paren-mode t)

;; smex-mode
;; bind Caps-Lock to smex
;; (when (eq window-system 'x)
;;   (shell-command "xmodmap -e 'clear Lock' -e 'keycode 66 = F13'"))
;; (global-set-key (kbd "M-x") 'smex)
;; (global-set-key (kbd "M-X") 'smex-major-mode-commands)
;; (global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)

;; snippets
(yas-global-mode 1)
