diff options
Diffstat (limited to 'Emacs/.config/emacs/config.org')
-rw-r--r-- | Emacs/.config/emacs/config.org | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index a4767dd..95ce998 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1460,24 +1460,13 @@ are some corners I'd like to adjust). :config (with-eval-after-load "evil-collection" (evil-collection-dired-setup)) - (defun +dired/display-thumb-or-file () - "If the file under point is a image file then display a -thumb, otherwise open the file." + + (defun +dired/insert-all-subdirectories () + "Insert all subdirectories currently viewable." (interactive) - (let* ((filename (dired-get-filename)) - (ext (file-name-extension filename))) - (if (or (string= ext "png") - (string= ext "jpg") - (string= ext "jpeg") - (string= ext "gif")) - (image-dired-display-thumb) - (find-file-other-frame filename)))) - - (defun +dired/maybe-frame (&optional ARG) - (interactive "P") - (if ARG - (call-interactively #'dired-other-frame) - (call-interactively #'dired))) + (dired-mark-directories nil) + (mapcar #'dired-insert-subdir (dired-get-marked-files)) + (dired-unmark-all-marks)) (nmmap :keymaps 'dired-mode-map @@ -1487,8 +1476,8 @@ thumb, otherwise open the file." (local-leader :keymaps 'dired-mode-map "l" #'dired-maybe-insert-subdir - "u" #'dired-undo - "i" #'+dired/display-thumb-or-file)) + "m" #'dired-mark-files-regexp + "u" #'dired-undo)) #+end_src *** fd-dired |