Fzf: MRU sort order in vim

Created on 20 Jan 2016  路  5Comments  路  Source: junegunn/fzf

I've been experimenting with your MRU examples for vim. Is there a way to sort the MRU files by how recently they were opened? Or is that information simply not available in vim? Would a plugin like neomru help any in this case? I've noticed that both CtrlP and Unite seem to be able to create a MRU list sorted correctly.

The use case here is that I want to be able to switch back quickly to the previously viewed buffer (without having to type most of the filename).

question tip

Most helpful comment

I made my own script to track the MRU for fzf.vim sometime last year and didn't think to make it public. I've been using the FilesMru command as a replacement for ctrl-p and the MRU tracking I added to it has been working pretty well.

Here it is if any of you are interested: https://github.com/tweekmonster/fzf-filemru

All 5 comments

Or is that information simply not available in vim?

As far as I know, v:oldfiles is all we have. MRU plugins you mentioned manually do the bookkeeping.

.. which is not what I'm interested in doing. If might be possible though that we can use the information from those plugins, with their API or exposed global variables.

The use case here is that I want to be able to switch back quickly to the previously viewed buffer

Are you aware of CTRL-6 (:help CTRL-6)? CTRL-O is also nice.

thanks for the info @junegunn ! I was unaware of CTRL-6 and CTRL-O -- those should come in handy. And for now CtrlP's MRU works fine. Just thought if there was a way to do everything with FZF, it might be nice.

CTRL-6 is simply indispensable :)

nice CTRL-6! maybe a shared MRU repo as plugin?

I made my own script to track the MRU for fzf.vim sometime last year and didn't think to make it public. I've been using the FilesMru command as a replacement for ctrl-p and the MRU tracking I added to it has been working pretty well.

Here it is if any of you are interested: https://github.com/tweekmonster/fzf-filemru

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sandric picture sandric  路  3Comments

ahmedelgabri picture ahmedelgabri  路  3Comments

olethanh picture olethanh  路  3Comments

leonklingele picture leonklingele  路  3Comments

erusev picture erusev  路  3Comments