Vscode: Add files to Recent Files list when brought in via DND

Created on 21 Jun 2016  路  14Comments  路  Source: microsoft/vscode

  • VSCode Version: Code - Insiders 1.3.0-insider (06d108b4a0aa6c031e7c1e61a463c069809d6019, 2016-06-21T17:55:32.931Z)
  • OS Version: Windows_NT ia32 10.0.14342

Steps to Reproduce:

  1. Open VS Code
  2. Open some files by DND from file browser onto VS Code
  3. Close VS Code
  4. Try to use File > Open Recent > ...
  5. Observe that the files that had been opened recently are not in this list.

image

Maybe I misunderstood this menu but I expected there would be a list of files that had been opened recently, in the same way that Notepad++ does.

image

Would be nice if this list was also preserved across updates of VS Code.

feature-request verification-needed verified

All 14 comments

@dilijev we only add items there if you go via File > Open...

Do you open files differently and expect them to show up?

Yes, I most often open files by dragging them from explorer into VS Code, because I have another editor configured for my default text editor and File > Open is much slower than D'n'D. I would expect the recent files list to be updated no matter how I open files.

@dilijev well, that depends. would you expect the recent files to be updated when you click on a file in the explorer? or from a quick open search?

Maybe there are scenarios where it doesn't make sense (like the temporary tabs that VS 2015 opens when you search with Ctrl+, or navigate to header with Ctrl+Shift+G etc.)

However, I think if File > Open... is the only scenario where the list is populated then something is missing. I think any file which is opened deliberately should probably count as a recently opened file (File > Open..., Drag-and-Drop, and Double-Click to open in default editor [when set to VS Code] would count), and any file which is opened by another action where it makes sense to open the file for editing but it wasn't necessarily the users intent (I just wanted to peek at some code), then maybe it shouldn't be added to the list.

Please add the Drag-and-Drop scenario at least? :)

I updated this issue because besides DND it works as you say.

@bpasero Thanks!

In addition to lacking support for Drag/Dropped files, the "Open Recent" list does not log SAVED files; if you open a file and save it under a new name, the new name isn't recorded in the RECENT list.

+1 on ericlaw1979's comment. It seems that VS Code does not care about files that were recently open, but rather it cares about files that were recently opened. I think that paradigm is incorrect. I almost always create new files and they never show up, but I really want them to.

Fyi we have another concept for opening recent files (at least associated to your current folder context): Ctrl/Cmd+P shows any file recently opened (independent how) right away.

I always thought the "recent files" feature in menu (files/open recent) is broken, because it shows none of the files I open. It should list any and all files open in the editor, IMO. Otherwise it's not "recent files", but "recent files that you opened through one of the 8 ways of opening a file in this editor" feature ;)

(CTRL+P is neat)

@PunchyRascal this issue talks about opening a file via DND, you are asking to add any file that you open in the editor to the list of recent files. For that please stick to Ctrl+P as it scales a lot better to a large number of files and offers a way to quickly search for a file.

Btw when I test other typical applications, they seem not to add files to the recent list by just opening them (e.g. from the explorer). There seems to be specific actions for only then an entry is added to the list (e.g. by using File > Open).

I only mentioned what was my impression of the menu recent files list, but with the ctrl+p list I am all set, so definitely no need for any action on my behalf.

@bpasero DND adds files to Recent in Notepad++ at least. So there's at least one precedent. For some reason, I use the recent files list a lot in Notepad++, and it has always felt extremely natural to me.

Dropping files from outside VS Code into the editor area or tab area will now add them to the list of recently opened (File > Open Recent).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

villiv picture villiv  路  3Comments

borekb picture borekb  路  3Comments

shanalikhan picture shanalikhan  路  3Comments

trstringer picture trstringer  路  3Comments

curtw picture curtw  路  3Comments