feature/evil (neotree): don't ask for confirmation when creating files
This commit is contained in:
parent
da663aa5da
commit
1ca2f06c16
1 changed files with 7 additions and 0 deletions
|
@ -386,6 +386,13 @@
|
||||||
|
|
||||||
(push neo-buffer-name winner-boring-buffers)
|
(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
|
;; 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.
|
;; overridden when the neotree buffer is spawned). So we bind them in a hook.
|
||||||
(add-hook 'neo-after-create-hook '+evil|neotree-init-keymap)
|
(add-hook 'neo-after-create-hook '+evil|neotree-init-keymap)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue