Drag selected text to move it?

2020-04-02 02:14发布

Is it possible to drag selected text to move it? This is in almost every other editor (not to mention text input fields in browsers.) I was surprised not to find it in VS Code.

Here is a gif example.

4条回答
兄弟一词,经得起流年.
2楼-- · 2020-04-02 02:29

Looks like it's not yet implemented, but there's an open issue about it.

If you want to help without diving into the internals, go

查看更多
家丑人穷心不美
3楼-- · 2020-04-02 02:32

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

查看更多
Bombasti
4楼-- · 2020-04-02 02:40

I don't believe so. Their site says that it is keyboard-optimized and keyboard-centric, so their idea might be that you should highlight some text, cut it, and past it where you want it rather than dragging it.

查看更多
对你真心纯属浪费
5楼-- · 2020-04-02 02:45

I talk about this problem on Github Microsoft page and Microsoft engineers see this. I hope to solve it. (Please support by

查看更多
登录 后发表回答