ivy delete file with confirmation
This commit is contained in:
parent
1c8cb4a58c
commit
3e60792136
|
@ -33,8 +33,7 @@ than this amount.")
|
||||||
("v" spacemacs/find-file-vsplit "in vertical split")
|
("v" spacemacs/find-file-vsplit "in vertical split")
|
||||||
("s" spacemacs/find-file-split "in horizontal split")
|
("s" spacemacs/find-file-split "in horizontal split")
|
||||||
("l" find-file-literally "literally")
|
("l" find-file-literally "literally")
|
||||||
;; this is to invasive, maybe have prompt?
|
("d" spacemacs/delete-file-confirm "delete file")
|
||||||
;; ("d" spacemacs/delete-file "delete file")
|
|
||||||
("r" spacemacs/rename-file "rename file"))
|
("r" spacemacs/rename-file "rename file"))
|
||||||
"Default ivy actions for files.")
|
"Default ivy actions for files.")
|
||||||
|
|
||||||
|
|
|
@ -341,6 +341,13 @@ removal."
|
||||||
(projectile-project-p))
|
(projectile-project-p))
|
||||||
(call-interactively #'projectile-invalidate-cache)))))
|
(call-interactively #'projectile-invalidate-cache)))))
|
||||||
|
|
||||||
|
(defun spacemacs/delete-file-confirm (filename)
|
||||||
|
"Remove specified file or directory after users approval.
|
||||||
|
|
||||||
|
FILENAME is deleted using `spacemacs/delete-file' function.."
|
||||||
|
(interactive "f")
|
||||||
|
(funcall-interactively #'spacemacs/delete-file filename t))
|
||||||
|
|
||||||
;; from magnars
|
;; from magnars
|
||||||
(defun spacemacs/delete-current-buffer-file ()
|
(defun spacemacs/delete-current-buffer-file ()
|
||||||
"Removes file connected to current buffer and kills buffer."
|
"Removes file connected to current buffer and kills buffer."
|
||||||
|
|
Loading…
Reference in New Issue