My name is Henrik and I'm an emacs addict. (Hello Henrik)

This commit is contained in:
Henrik Lissner
2015-05-20 22:28:41 -04:00
parent eafb74110f
commit 7d44ea4db4
50 changed files with 1154 additions and 2571 deletions

View File

@@ -1,39 +1,50 @@
;; Project nav+search tools (projectile, helm, ag)
(use-package neotree
:commands (neotree-show neotree-hide neotree-toggle)
:commands (neotree-show neotree-hide neotree-toggle neo-global--window-exists-p neotree-dir neotree-find)
:init
(progn
(defun my-neotree-open (&optional dir)
(interactive)
(neotree-dir (or dir (project-root))))
(defun my-neotree-toggle ()
(interactive)
(if (neo-global--window-exists-p)
(neotree-hide)
(my-neotree-open)))
(defun my-neotree-find ()
(interactive)
(save-excursion (my-neotree-open))
(neotree-find)))
:config
(progn (setq neo-create-file-auto-open t
neo-smart-open t
neo-persist-show nil)
(add-hook! 'neotree-mode-hook
(setq mode-line-format nil)
(bind evil-motion-state-local-map
(kbd "TAB") 'neotree-enter
(kbd "RET") 'neotree-enter))))
(progn
(setq neo-create-file-auto-open t
neo-mode-line-type 'neotree
neo-persist-show t
neo-window-width 28
neo-show-updir-line nil
neo-auto-indent-point t)
(add-to-list 'evil-motion-state-modes 'neotree-mode)
(defun my-neotree-keymap ()
(bind evil-motion-state-local-map
"\\\\" 'neotree-hide
"RET" 'neotree-enter
"J" 'neotree-select-next-sibling-node
"K" 'neotree-select-previous-sibling-node
"H" 'neotree-select-up-node
"L" 'neotree-select-down-node
"v" 'neotree-enter-vertical-split
"s" 'neotree-enter-horizontal-split
"c" 'neotree-create-node
"d" 'neotree-delete-node
"g" 'neotree-refresh
"q" 'neotree-hide
"r" 'neotree-rename-node
"R" 'neotree-change-root
"?" 'neotree-))
(defun my-ido-find-project-file ()
(interactive)
(let ((default-directory (project-root)))
(ido-find-file)))
;; (use-package dired
;; :disabled t
;; :config
;; (progn
;; (setq dired-recursive-deletes 'always
;; dired-recursive-copies 'always
;; dired-auto-revert-buffer t
;; ;; if there is a dired buffer displayed in the next
;; ;; window, use its current subdir, instead of the
;; ;; current subdir of this dired buffer
;; dired-dwim-target t)
;; (push '(dired-mode :position bottom :height 0.5 :stick t) popwin:special-display-config)
;; (add-hook! 'dired-mode-hook
;; (use-package 'dired+ :config (toggle-diredp-find-file-reuse-dir 1)))))
(add-hook 'neotree-mode-hook 'my-neotree-keymap)))
(provide 'init-project)