1

How to sort the list of buffers Vim displays on entering :b <Tab> by most recent?

I'm used to the Spacemacs ordering, which displays buffer filenames in separate rows (vertically) in the order of most recent access.

I like accessing files by autocompleting the filename, so :ls is not an option. I do not interact with buffers in other ways, so I'm fine with breaking things or using plugins. I already use fzf.vim.

There were some similar questions, but nothing directly relevant to my problem.

8
  • 1
    can you explain what you mean by "after :b" and "displaying vertically?"
    – Mass
    Jun 10 at 0:18
  • 1
    Sorry, it is actually after :b <Tab>. Jun 10 at 0:33
  • This does not answer your question, but I have two recommendations for your cases: bufexplorer for viewing buffers; They are ordered by last used by default. Then ctrl-p for a fuzzy file finder. Super easy to use and even more useful.
    – earthling
    Jun 10 at 6:09
  • Pretty sure tab completion of buffers is core, non-configurable functionality, i.e. short of someone basically (re)implementing something similar in vimscript you're stuck with lexicographical ordering.
    – B Layer
    Jun 10 at 10:09
  • Actually, looking at the accepted answer found through the third link you provided, which pretty much says what I said about tab completion ordering...you're not going to get any substantially different answer here. At least not without expanding your horizons beyond just tab completion. (FYI, the author was a major contributor here, too, and knows what they're talking about.)
    – B Layer
    Jun 10 at 18:04

This site is temporarily in read only mode and not accepting new answers.

Browse other questions tagged .