-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Support to drag and drop selected text #1046
Comments
👍 Except I think you don't have to hold ctrl just to cut/paste - ctrl once dragging makes it copy instead of cut, right? But regular drag gets rid of the original, moves it to the new location. |
👍 +1 |
+1, commenting to get notification. Really miss that. |
Agreed. |
NEEEEED! I use this constantly! feels alien without it and so long winded.. |
+1 this is a must have |
It took more than one year for them to implement this feature....... |
@wmjordan how much did you pay for VSCode? |
@Spown sorry for duplicate. Deleted. |
+1 |
no comments re: being able to drop a library item from the directory tree into a view to set the path for css / js etc libraries --- a la Visual Studio |
What's the technical holdback on drag and drop of selected text? |
@reactivize I don't think its technical. I think nobody on the dev team thinks its worth spending time onto because nobody of them uses this coding style. VSCode was meant to be used without taking your hands away from the keyboard, hence no button palettes, a textual command palette, no miniwindows, etc. They already kinda separated Monaco editor from the core so maybe it would be possible in the future to plug in a different editor, like Ace (however I don't think so, since hardly any of the available editors offer debugger support, ie breakpoints) that already supports D&D. But a standardized interface between core and wrapped editor is needed for that and this can be even more difficult to implement. |
@reactivize There is no technical holdback, each milestone we pick features from the backlog to implement. We use thumbs up counts and comment counts as metrics to determine the community desire for a certain feature and then we use our best judgement (effort vs rewards, short-term vs long-term benefits) to pick what to work on. |
Starting up some development, decided to use this tool because of the debugger, and this was really annoying to find missing. |
Adding both my thumbs up to the request for this feature. Its driving me crazy that its not there. |
Must have!!! |
A feature that is in visual studio obviously should be in visual studio code as well. |
@rotan-hanrahan thank you very much, you helped me create a thorough test plan for this feature :) |
Would it be a problem to have a drop-handler in the extension api? I am thinking of a feature of dropping images on markdown code and - like here on github - getting the image uploaded (in this case added to a project). |
I second that ^. Would be great to see API hooks for workspace drop events. Usage example: If you render a list of components / plugins / whatever in the second tab (as a read-only HTML), you can drag and drop them to the workspace then. I'll be happy to collaborate on this feature if needed. |
Thank you x 10,000 to @rebornix and everyone who contributed to this. I'm enjoying this now in 1.10.0, and life is more pleasant now! This feature makes a big difference for me and I'm truly delighted. I worked for 12 years at MS long ago, including several in the Visual Studio and other Dev Div product groups. I've never been so happy to see a few feature ship, seriously. Thanks again! |
Thank you @rebornix very much. |
Great start, thanks for adding this! Some notes for polish on the final product (not sure if there's a better place to put these):
Visual Studio and most editors with drag/drop support do these things if you need an example. Thanks again!! |
I second @langdonx suggestions, particularly the one about using CTRL+drag to copy. |
@langdonx @rebornix For MVP it's a great start, but it needs some finer tuning, for instance
|
I mentioned previously some of the failing test cases that have been raised since the preview of the @rebornix D&D support was released. This D&D feature enhancement, limited as it is, is still a massive improvement over having no D&D support at all. I would like to point out that the "drag to top/bottom of window to cause scrolling" appears to work despite the (closed) test cases documentation #21012 stating that this functionality is not supported. Seems we got lucky with this one. As people seem to be contributing to the shopping list of must-haves, let me add this proposal: drag selected text over the title tab of an open file in VSC (other than the current file in which the text is selected) so that the hovered-over tab becomes the active document, allowing the user to drag text between files. This would be a bit like the way that tabs in the Windows task bar can activate the corresponding window/application as a drop target when you hover over the tab while dragging. (And please note that this isn't a must-have, but it will be pleasant to see working some day.) |
Not knowing where to comment on the feature, I am adding it here.
Looking at other programs, the cursors actually look like so: |
We shouldn't be able to drag text from the margin select. I use this to
reselect, and it causes problem because it drags text now.
We should be able to copy the text when holding Ctrl. Personally, without
this that DD feature is useless. I use this all the time in VS.
…On Wed, Mar 8, 2017 at 9:23 AM, dvader ***@***.***> wrote:
Not knowing where to comment on the feature, I am adding it here.
Regarding the comment from @langdonx <https://github.com/langdonx>:
- The mouse cursor should change to the default arrow when you hover
over a selection that can be dragged and while dragging it.
Looking at other programs, the cursors actually look like so:
1. Hover (as in the comment): [image: arrow over]
<https://cloud.githubusercontent.com/assets/2127127/23707487/2ff89c76-03d8-11e7-923a-fb7ba46ca1ee.png>
2. Move: [image: move arrow]
<https://cloud.githubusercontent.com/assets/2127127/23707503/40bdbbfe-03d8-11e7-9915-c80832e55b89.png>
3. Copy (holding the Ctrl key): [image: copy arrow]
<https://cloud.githubusercontent.com/assets/2127127/23707514/502dd6c8-03d8-11e7-864c-0de6970c52d6.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1046 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACXii3NvZET_m0rujjGG8uL1G2XRgs9mks5rjrnzgaJpZM4GvkSo>
.
|
Amazing! Thanks.
Only missing will be the margin select to not drag the text. But that's
already a huuuuge step forward.
…On Wed, Mar 8, 2017 at 5:10 PM, Peng Lyu ***@***.***> wrote:
@dvader <https://github.com/dvader> the mouse pointer style update is
coming in tomorrow's Insider
DND
[image: default]
<https://cloud.githubusercontent.com/assets/876920/23726355/da8fce86-0408-11e7-8b30-b34b0b7f9f1b.gif>
DND with Alt/Ctrl Key pressed
[image: copy]
<https://cloud.githubusercontent.com/assets/876920/23726368/e2a3dfea-0408-11e7-81d9-07a14c6a92fe.gif>
@Daivuk <https://github.com/Daivuk> you should be able to copy instead of
just cutting.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1046 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACXii1TDGwLP3Gtu1F0wgPCqW3_zHSBWks5rjydYgaJpZM4GvkSo>
.
|
When is this coming to OSX? |
This is now supported as of Feb 2017 release (1.10.1) but it is disabled by default. To enable it: Go to File > Preferences > Settings and add this line "editor.dragAndDrop": true Source: https://code.visualstudio.com/updates/v1_10#_preview-drag-and-drop-selected-text |
Happy to see the continual progress on this. Just got the March release and noticed one minor (but annoying) issue:
My typical workflow is, 1) select text, 2) drag text, 3) hold control, 4) drop text. With this workflow, since my mouse is still, it's not clear that the text will be copied when I release the mouse. Thanks for all the hard work! CC: @rebornix (not sure who else to CC) =[ |
@langdonx it's a valid feature request, do you want to create an issue for me? |
Cross reference #24547 |
Drag and drop is working fine in visual code but the same code is not updated in Monaco editor ? |
Wow, It's amazing that this feature has been already implemented into VS Code! |
@DRSDavidSoft do you mind tell me how to feature a comment as a solution? |
@wewake4 we updated Monaco on Mar 3rd, you should be able to have this feature. |
In Microsoft Visual Studio Professional you can click+hold on selected text and then drag that text to a new location. Like a cut/paste operation by dragging/dropping. Requesting that VS Code support this feature. Thanks!
The text was updated successfully, but these errors were encountered: