My favorites | Sign in
Project Home Issues
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 157: The "Open Recent" menu only shows files that have been opened through the file menu
8 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----

Sign in to add a comment
Reported by, Feb 18, 2009
What steps will reproduce the problem?

1. Open a file using the "File-> Open" option. It will appear in the
"File->Open Recent" sub-menu.
2. Open a file from within MacVim, using :e or :n or whatever.
3. The opened file does not appear in the "File->Open Recent" submenu.

What is the expected output? What do you see instead?

See above.

What version of MacVim and OS X are you using (see "MacVim->About MacVim"
and  "Apple Menu->About This Mac" menu items, e.g. "Snapshot 40, 10.5.6

MacVim 7.2 Stable 1.2 (33.3) 

Intel Macbook, OSX 10.5.5 

Feb 20, 2009
Project Member #1
This is a known limitation.  We did discuss this issue a while back but it is
non-trivial to make the "open recent" menu show files open from Vim (using :e etc.).  

Also, some people actually prefer to separate files opened from Finder as opposed to
those opened from Vim so the current behavior can't quite be classified as a "bug".

By the way, do you really want this change (i.e. would it be useful to you) or did
you point it out mostly just because you noticed it?
Feb 20, 2009
It's definitely something that would be useful to me, but if it's not something that
can be fixed easily, well, I can live with that. However, it should probably be
mentioned somewhere, like in the FAQ. In a perfect world, there should be an option
in .vimrc or .gvimrc that would control whether files opened through vim showed up in
the "Open Recent" menu or not. That way, everyone could have their cake and eat it too.
Apr 8, 2009
Project Member #3
(No comment was entered for this change.)
Labels: -Type-Defect Type-Enhancement
Apr 18, 2009
I was about to create the same ticket.  It is something I would like rather than 
just noticed.  In my case though it was for files opened from the Terminal using 
mvim rather than using :e. Maybe internally these are the same thing though. I think 
the ability to either choose for them to either show up in the Open Recent, or the 
ability to turn on another menu which splits them into two sections would be great.
Sep 30, 2010
What TextMate has, and that would IHMO make great sense, is to be able to add files to the "Open recent" history when invoked from the command-line with mvim.

Indeed, most of the time I open files from the terminal, and it would really help to be able to quickly get back to a file.

On the other hand, adding file ever opened might be an annoyance. Think for instance commit messages when mvim is set as $EDITOR. Personnaly I really don't want those added to my history.
Sep 30, 2010
Project Member #6
Thanks for the suggestions.  I'll give this some more thought.
Jan 19, 2011
It would be great to have this feature for files opened via mvim (which is pretty much the only way I use macvim, and I use it a lot).

Agreed that it would be an annoyance for every file opened via $EDITOR (i.e. commit messages), so it would be great if you could pass a flag to mvim to not add the file to the recents menu, like:

mvim --norecent
Jan 20, 2011
Project Member #8
That's not a bad idea at all.  I have been considering some configuration of regexps describing file name patterns not to add to the MRU etc. but this seems like such overkill.  A command line flag is a lost simpler.

However, do note that all files opened will be added to the MRU -- including files opened with :e et al (and these will not be abled to be "blocked" with some flag).  Maybe this will cause lots of unwanted entries in the MRU due to files being opened from within plugins?  I'll have to test this.
Jan 20, 2011
I'm just a programming hobbyist, but also a huge MacVim lover for
writing. I would just like the option to add files to the MRU list
from the commandline.

Meaning, what if your flag worked the other way: Supply --recent or
something when you WANT the file added to the MRU, instead of figuring
out regexes for files you DON'T want added?
Jan 20, 2011
Project Member #10
OK.  I added this feature now.  Only files opened from the command line will be added to the MRU.  Using :e etc. will _not_ modify the MRU because I think a lot of garbage will get added to the MRU this way (from plugins).

I also added the --nomru switch to avoid adding files to the MRU.

Lets test it out and see how it works.  If it gets annoying I may end up pulling this feature (or perhaps change it as in the suggestion of Comment 9).
Jan 22, 2011
Works great so far! And as an added bonus, I learned to build. :)

Thank you, Bjorn
May 14, 2012
Hi Bjorn, is there a version of this that would work for 10.6 (macvim 7.3 currently)? It would extremely useful to have
May 16, 2012
Project Member #13
There is a link to a build of the latest snapshot for 10.6 on the home page (under "Legacy Mac OS X downloads").  It includes this feature.
Jan 7, 2013
I was surprised that when I saved a file using the save button in the UI (not :w) it did NOT appear in my Open Recent menu. Bug?
Sign in to add a comment

Powered by Google Project Hosting