1

I know that setting ivy-use-virtual-buffers leads to recently opened files being shown in the ivy-switch-buffer completion. However, I don't want this.

What I want is a separate function for opening recent files. When I invoke recentf-open-file, I want the ivy completion for recent files, instead of the clunky recentf menu.

Doom Emacs provides a neat implementation of this, but I can't seem to find a way to do this in vanilla Emacs. Do I have to write my own function for this? This seems redundant considering the fact that ivy already has the mechanism to do this.

1
  • elisp tag doesn't apply here. Please read Elisp tag info Commented May 17, 2020 at 9:39

1 Answer 1

7

You're looking for counsel-recentf, which comes with counsel.

Just M-x counsel-recentf or bind it to any keys you'd like and that's all you're looking for.

Loosely speaking Ivy is the completion backend, counsel provides functionality to use ivy "replacing" some popular commands with ivy-style completion.

2
  • Thanks, I've discovered crux-recentf-find-file and checked the source code. This function is easy to implement using completing-read and recentf-list. Commented May 17, 2020 at 13:10
  • Chances are that if you installed ivy also did it with basic counsel. Commented May 17, 2020 at 13:21

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.