about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el5
-rw-r--r--lisp/+dired.el11
2 files changed, 14 insertions, 2 deletions
diff --git a/init.el b/init.el index ec82d73..96fa0ac 100644 --- a/init.el +++ b/init.el
@@ -246,7 +246,7 @@
246 compilation-scroll-output t)) 246 compilation-scroll-output t))
247 247
248(setup dired 248(setup dired
249 (:also-load dired-x) 249 (:also-load dired-x +dired)
250 (:also-straight dired+) 250 (:also-straight dired+)
251 (:option dired-recursive-copies 'always 251 (:option dired-recursive-copies 'always
252 dired-recursive-deletes 'always 252 dired-recursive-deletes 'always
@@ -266,7 +266,8 @@
266 shell touch) 266 shell touch)
267 dired-dwim-target t) 267 dired-dwim-target t)
268 (:local-set truncate-lines t) 268 (:local-set truncate-lines t)
269 (:bind "<backspace>" #'dired-up-directory) 269 (:bind "<backspace>" #'dired-up-directory
270 "j" #'+dired-goto-file)
270 (:hook #'dired-hide-details-mode 271 (:hook #'dired-hide-details-mode
271 #'hl-line-mode 272 #'hl-line-mode
272 #'lin-mode) 273 #'lin-mode)
diff --git a/lisp/+dired.el b/lisp/+dired.el index 7decec1..131d326 100644 --- a/lisp/+dired.el +++ b/lisp/+dired.el
@@ -2,7 +2,18 @@
2 2
3;;; Code: 3;;; Code:
4 4
5(require 'vertico)
5 6
7(defun +dired-goto-file (file)
8 "ADVICE for `dired-goto-file' to make RET call `vertico-exit'."
9 (interactive ; stolen from `dired-goto-file'
10 (prog1
11 (list (dlet ((vertico-map (copy-keymap vertico-map)))
12 (define-key vertico-map (kbd "RET") #'vertico-exit)
13 (expand-file-name (read-file-name "Goto file: "
14 (dired-current-directory)))))
15 (push-mark)))
16 (dired-goto-file file))
6 17
7(provide '+dired) 18(provide '+dired)
8;;; +dired.el ends here 19;;; +dired.el ends here