-
Notifications
You must be signed in to change notification settings - Fork 37.5k
feature: allow to paste files from the clipboard #195730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bpasero
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty cool, does this run on all platforms?
Thanks! I have only tested on Linux so far, but I can test on Windows tomorrow. I don't have any MacOs for testing. Edit: On Windows it seems to work great as well! |
|
I am also curious how this (if at all) interferes with VS Code internal copy/paste. For example, today you can copy a folder in one VS Code window and paste it into the explorer of another window and it works. |
|
In both cases the Copying a folder in one VS Code window and pasting it into the vscode file explorer of another window
Copying a folder from the native file explorer and pasting into the vscode file explorer
Depending on the data, either So far in my testing, there have never been any conflicts/interferences between the two. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change LGTM, though I did not test it on Windows or Linux.
I wonder if we should show a dialog before pasting native files, simply because users might not be aware yet and its quite easy to accidentally paste and thus create a very large folder structure in the workspace if you happen to have one in the clipboard. The dialog could be tied to a new setting and have a checkbox to never ask again, similar to how we have that for preventing accidental drag and drop operations:
|
While I totally get the potential pitfalls of accidental large pastes, adding a dialog might introduce an extra step that could disrupt the user flow. It seems to me much more rare to accidentally paste files with On the other hand, if multiple people report it as an issue, of course I would not be opposed to adding a dialog. Perhaps we could merge this and gather some feedback from vscode-insiders users if there are any issues. What do you think? |
I do wonder how much rarer that is though. I accidentally paste text all the time that I didn't mean to because I don't know what the contents of my clipboard are. It's also probably beneficial to align the experiences so moving and creating sets of files is all the same. |
|
Just to clarify: the dialog has a checkbox to never ask again (updating a setting). So its really up to the user. And its a nice gesture for users that are not aware of this change in the future. |
|
Okay, you have convinced me. I also wanted to avoid the extra work... :) |
|
Here is the paste file handler with the confirmation dialog: paste.mp4 |
|
Thanks so much for the contribution @SimonSiefke! This will be in Monday's insiders release for everyone to try :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__

fixes #130036
For testing:
ctrl+v(orcmd+Von macOS)