2 ms·
I have something very much like this, a trivial addition to find-file. Typing C-u C-x C-f shows the recently edited filenames (with paths), and vertico + orderl
by watrup 4y ago
I have something very much like this, a trivial addition to find-file. Typing C-u C-x C-f shows the recently edited filenames (with paths), and vertico + orderless makes it a joy to instantly pick the specific recent file. I get the same UI with regular find-file (C-x C-f), so the two bindings live harmoniously in my brain and fingers.
(defun MY-consult-find-file (arg)
"If no prefix: find-file, otherwise consult-recentf."
(interactive "p")
(let* ((filename
(if (eq arg 1)
(call-interactively 'find-file)
(call-interactively 'consult-recent-file)))
)))
(global-set-key (kbd "C-x C-f") 'MY-consult-find-file)
Before switching to vertico/orderless, I used ivy with essentially the same machinery. That worked great too.