General refactor + clean up
This commit is contained in:
parent
ac590845f9
commit
6259c64866
2 changed files with 19 additions and 22 deletions
|
@ -465,16 +465,14 @@ algorithm is just confusing, like in python or ruby."
|
|||
|
||||
(push neo-buffer-name winner-boring-buffers)
|
||||
|
||||
;; Don't ask for confirmation when creating files
|
||||
(defun +evil*neotree-create-node (orig-fun &rest args)
|
||||
"Don't ask for confirmation when creating files"
|
||||
(cl-letf (((symbol-function 'yes-or-no-p) (lambda (&rest _) t)))
|
||||
(apply orig-fun args)))
|
||||
|
||||
(advice-add #'neotree-create-node :around #'+evil*neotree-create-node)
|
||||
|
||||
;; Adding keybindings to `neotree-mode-map' wouldn't work for me (they get
|
||||
;; overridden when the neotree buffer is spawned). So we bind them in a hook.
|
||||
;; `neotree-mode-map' are overridden when the neotree buffer is created. So we
|
||||
;; bind them in a hook.
|
||||
(add-hook 'neo-after-create-hook #'+evil|neotree-init-keymap)
|
||||
(defun +evil|neotree-init-keymap (&rest _)
|
||||
(map! :Lm "\\\\" 'evil-window-prev
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue