blob: 2e42c19c746579f79e1a583623dfa3bde91a9395 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
;;; +dired.el -*- lexical-binding: t -*-
;;; Code:
(with-eval-after-load '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)))
;;; [[https://www.reddit.com/r/emacs/comments/u2lf9t/weekly_tips_tricks_c_thread/i4n9aoa/?context=3][Dim files in .gitignore]]
(defun +dired-dim-git-ignores ()
"Dim out .gitignore contents"
(require 'vc)
(when-let ((ignores (vc-default-ignore-completion-table 'git ".gitignore"))
(exts (make-local-variable 'completion-ignored-extensions)))
(dolist (item ignores)
(add-to-list exts item))))
(provide '+dired)
;;; +dired.el ends here
|