Rewrite move/copy/delete file commands
To use rename-file, copy-file and delete-file, so these commands can enjoy the benefits of any plugins that have advised these, like org-roam does for rename-file.
This commit is contained in:
parent
64f15bfe3c
commit
c1127a5bde
2 changed files with 71 additions and 102 deletions
|
@ -6,8 +6,7 @@
|
|||
kills the buffer. If FORCE-P, force the deletion (don't ask for confirmation)."
|
||||
:repeat nil
|
||||
(interactive "<f><!>")
|
||||
(doom/delete-this-file (or filename (file-truename buffer-file-name))
|
||||
force-p))
|
||||
(doom/delete-this-file filename force-p))
|
||||
|
||||
;;;###autoload (autoload '+evil:move-this-file "editor/evil/autoload/files" nil t)
|
||||
(evil-define-command +evil:move-this-file (new-path &optional force-p)
|
||||
|
@ -30,4 +29,3 @@ overwrite the destination file if it exists, without confirmation."
|
|||
(when (or (not new-path) (string-empty-p new-path))
|
||||
(user-error "No new path was specified"))
|
||||
(doom/copy-this-file new-path force-p))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue