From 7576787242f9a7834c6acd29657150d03f51f0d9 Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Wed, 21 Sep 2022 23:05:13 +0200 Subject: Improve dired workflow --- .config/emacs/init.el | 4 +++- Emacs.org | 37 ++++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index c33d57c..363c125 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -567,7 +567,9 @@ "p" 'dired-ranger-paste "X" 'dired-ranger-move "h" 'dired-up-directory - "l" 'dired-single-buffer)) + "l" 'dired-single-buffer + "q" 'kill-current-buffer) + (setq dired-kill-when-opening-new-dired-buffer t)) (use-package emms :config diff --git a/Emacs.org b/Emacs.org index 3b24b1b..89fb2e5 100644 --- a/Emacs.org +++ b/Emacs.org @@ -886,24 +886,27 @@ #+begin_src emacs-lisp - (use-package all-the-icons-dired - :hook (dired-mode . all-the-icons-dired-mode)) + (use-package all-the-icons-dired + :hook (dired-mode . all-the-icons-dired-mode)) + + (use-package dired-ranger) + + (use-package dired-single) + + (use-package dired + :ensure nil + :commands (dired dired-jump) + :custom ((dired-listing-switches "-agho --group-directories-first")) + :config + (evil-collection-define-key 'normal 'dired-mode-map + "y" 'dired-ranger-copy + "p" 'dired-ranger-paste + "X" 'dired-ranger-move + "h" 'dired-up-directory + "l" 'dired-single-buffer) + (setq dired-kill-when-opening-new-dired-buffer t) + (evil-define-key 'normal dired-mode-map (kbd "q") 'kill-current-buffer)) - (use-package dired-ranger) - - (use-package dired-single) - - (use-package dired - :ensure nil - :commands (dired dired-jump) - :custom ((dired-listing-switches "-agho --group-directories-first")) - :config - (evil-collection-define-key 'normal 'dired-mode-map - "y" 'dired-ranger-copy - "p" 'dired-ranger-paste - "X" 'dired-ranger-move - "h" 'dired-up-directory - "l" 'dired-single-buffer)) #+end_src -- cgit v1.2.3