 	:defer 1
 	:diminish git-gutter-mode)
 
+(defun start-deft-in-evil-insert-mode ()
+	(interactive)
+	(deft)
+	(evil-insert-state))
+
 (use-package deft
-	:requires markdown-mode
 	:init
 		(setq deft-directory "~/Dropbox/Notes")
 		(setq deft-recursive t)

			helm-ff-search-library-in-sexp t
			helm-buffer-max-length 40
			helm-scroll-amount 8)
	:config
	:bind ("M-x" . helm-M-x)
	:bind ("C-x b" . helm-for-files)
	:bind ("<f3>" . helm-for-files)
	:demand t)

;; N.B. demand loaded because invoked via evil-leader
(use-package projectile
	:init
		(setq projectile-completion-system 'helm)

		(setq projectile-mode-line '(:eval (format " [%s]" (projectile-project-name))))
	:config
		(projectile-global-mode 1)
		(use-package helm-projectile
			:config
				(helm-projectile-on)
				;; show projectile info in helm-for-files when in a project
				;;(add-to-list 'helm-for-files-preferred-list helm-source-projectile-projects)
				(add-to-list 'helm-for-files-preferred-list helm-source-projectile-files-list)
				;;(add-to-list 'helm-for-files-preferred-list helm-source-projectile-directories-list)
			)
		(use-package ag)
		(use-package helm-ag)
		(use-package grep)

	:bind
		("<f4> g" . helm-projectile-ag)
		("<f5>" . helm-projectile-find-other-file)
		("<f7> <f7>" . projectile-switch-project)
		("<f7> c" . projectile-compile-project)
		("<f7> u" . projectile-invalidate-cache)
	)

(use-package helm-gtags
	:init
		(setq helm-gtags-auto-update t)
		(setq helm-gtags-use-input-at-cursor t)
		(setq helm-gtags-ignore-case t)
	:config
		(add-hook 'dired-mode-hook 'helm-gtags-mode)
		(add-hook 'eshell-mode-hook 'helm-gtags-mode)
		(add-hook 'c-mode-hook 'helm-gtags-mode)
		(add-hook 'c++-mode-hook 'helm-gtags-mode)
		(add-hook 'asm-mode-hook 'helm-gtags-mode)
	:bind
		("<f6>" . helm-gtags-dwim)
		("<S-f6>" . helm-gtags-update-tags )
	:diminish helm-gtags-mode)

(use-package markdown-mode
