Vscode: Better drag and drop / clipboard integration of files across applications

Created on 19 Nov 2015  路  29Comments  路  Source: microsoft/vscode

This includes being able to drag files and folders from VS Code into other applications as well as to being able to copy a file or folder to the native clipboard.

Specifically:

  • copy files/folders from VS Code file explorer to clipboard and paste into native OS explorer
  • copy files/folders from native OS explorer and paste into VS Code file explorer
  • support the native file data transfer when doing drag and drop (https://github.com/atom/electron/issues/2853)
  • support 3rd party tools such as WinRAR to open files from an archive (https://github.com/microsoft/vscode/issues/90196)
feature-request help wanted upstream upstream-issue-linked workbench-dnd

Most helpful comment

@bradennapier The drag and drop works now (1.30.2) but Ctrl+C and Ctrl+V is not.

All 29 comments

Does this cover dragging a folder from desktop to VSCode, and adding that folder into an existing project?

Right now, dragging a folder to an open project/window. Opens a new window on Mac. Which is not what people expect I suppose. Though, dragging a folder to the VSCode app icon should open a new window.

We are explicitly disabling to drop a folder into the explorer to copy it to prevent accidentally large folder-copy operations. We could however allow to drop a folder and ask the user for feedback, so I would say that is independent from this particular issue here.

Played around a little bit with https://github.com/electron/electron/pull/6333 but unfortunately once I do that, no in-app DND seems to be working anymore...

Some findings:

  • macOS: looks like it is possible to read/write files to/from the clipboard (via https://github.com/electron/electron/issues/9035#issuecomment-359161275)
  • Windows: it is possible to read a single file from the clipboard (via https://github.com/electron/electron/issues/9035#issuecomment-306933488) but not write to
  • Linux: no findings yet

Setting the "help wanted" label if someone has ideas how to get this working without having to introduce a 3rd party module or even native code.

It looks like when writing to NSFilenamesPboardType on macOS, the renderer crashes when pasting into an input field right after.

Any update here? Copy and paste is a pretty basic need :-\

@bradennapier The drag and drop works now (1.30.2) but Ctrl+C and Ctrl+V is not.

Ah ok, I only tested the shortcuts as I usually work in full screens and swipe between them.

Def looking forward to solution, love me some vscode otherwise :)

Will ever the CTRL +C , CTRL+V work ? :) I am having the latest version of VS Code :)

Ctrl + C, Ctrl + V still not working. Any update? it's really annoying.

Still no copy/paste - I was very surprised that copying a file from the (Microsoft) VSCode file explorer to the (Microsoft) Windows file explorer did not work. Seems like pretty basic functionality.

Up till now it seems that this problem hasn't been fixed. It's quite troublesome to drag file between windows everytime. Sincerely hope to add this feature asap.

support the native file data transfer when doing drag and drop (electron/electron#2853)

I often have to upload the python files I write into some webapp, which supports dropping of files. It would be great if I could indeed drag them directly from the vscode explorer.

Still waiting

I'm also waiting for Ctrl + C, Ctrl + V option.

Problem still exists in 1.37.1. Please fix it, very annoying.

I'm waiting for Ctrl + C, Ctrl + V option too.

It is interesting that is still an issue. It's been 4+ years ..

It is interesting that is still an issue. It's been 4+ years ..

It is interesting that is still an issue. It's been 4+ years ..

Can someone give some explanation why this issue cannot be solved?, I think Ctrl+C and CTRL+ V is heavy used in any application and a basic feature to have, also it's being 4 years...

Copy past still not work. But on mac you can drag folder or file with alt key to copy into vscode

only drag and drop work, hope to have copy and paste feature

5 years later... nothing

2020 this problem still persist!

2020 this problem still persist!

Maybe they don't like to do it

Any update on the issue ?

Any updates?

@bpasero This is such a basic feature. IDK is smtg serious is blocking it. I don't see how other advanced features get pirority over this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrkiley picture mrkiley  路  3Comments

philipgiuliani picture philipgiuliani  路  3Comments

curtw picture curtw  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments