summary refs log tree commit diff stats
path: root/lisp/+dired.el
blob: 131d3263cad7ba6b1d345a427ce493d1afb300ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
;;; +dired.el -*- lexical-binding: t -*-

;;; Code:

(require 'vertico)

(defun +dired-goto-file (file)
  "ADVICE for `dired-goto-file' to make RET call `vertico-exit'."
  (interactive                          ; stolen from `dired-goto-file'
   (prog1
       (list (dlet ((vertico-map (copy-keymap vertico-map)))
               (define-key vertico-map (kbd "RET") #'vertico-exit)
               (expand-file-name (read-file-name "Goto file: "
                                                 (dired-current-directory)))))
     (push-mark)))
  (dired-goto-file file))

(provide '+dired)
;;; +dired.el ends here