   (when (not (package-installed-p p))
     (package-install p)))
 
-
+(global-auto-revert-mode t)
+
+(autoload 'dirtree "dirtree" "Add directory to tree view" t)
 (elscreen-start)
 
 (custom-set-variables

  "Enable several minor modes that are generally applicable."
  (interactive)
  (flycheck-mode)
  (company-mode)
  (helm-mode)
  (rainbow-mode)
  )
(add-hook 'text-mode-hook 'flyspell-mode)
(add-hook 'web-mode 'default-minor-modes)
(add-hook 'python-mode-hook 'default-minor-modes)
(add-hook 'ruby-mode-hook 'default-minor-modes)

(add-hook 'javascript-mode-hook 'default-minor-modes)
(add-hook 'javascript-mode-hook 'tern-mode)

(add-hook 'after-init-hook 'global-company-mode)
(setq company-idle-delay t)

;; Use regex searches by default.
(global-set-key (kbd "C-s") 'isearch-forward-regexp)
