6

I'm coming from Helm to Ivy just to try it out, and one thing I miss greatly from Helm is how the default candidate when hitting M-x is whatever the last command was.

Is there some way to sort Ivy's results by most-recently used?

Drew
  • 75,699
  • 9
  • 109
  • 225
Ashton Wiersdorf
  • 349
  • 1
  • 11
  • Not exactly what you want but might help: `Ivy re-uses the following packages if they are installed: avy, amx or smex, flx, and wgrep.` So if you install smex you will have your last used commands at the top. – Hubisan Dec 03 '19 at 13:55
  • I would additionally suggest ivy-prescient(https://github.com/raxod502/prescient.el). – Aquaactress Dec 04 '19 at 20:37
  • @Aquaactress That worked. Thank you! If you turn it into an answer I'll accept it. – Ashton Wiersdorf Dec 05 '19 at 20:11
  • Update 2022-11-21: the best answer is to use Daniel Mendler's Vertico package with Consult, Marginalia, and Orderless :) – Ashton Wiersdorf Nov 22 '22 at 06:21

1 Answers1

6

I would suggest using ivy-prescient. It is a package that provides sorting and filtering for ivy.

After installing it, you enable it with ivy-prescient-mode.

For more details on it's usage see its usage README section.

Aquaactress
  • 1,393
  • 8
  • 11