Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drag selected text to move it?

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.

like image 854
pixelmike Avatar asked Nov 22 '15 17:11

pixelmike


People also ask

How do I move selected text?

Like files and folders, there are many ways to move text once it is selected: Cut using Ctrl+X, move your cursor to the new location of text, then paste to the new location with Ctrl+V. Copy using Ctrl+C, move your cursor to the new location of text, then paste to the new location with Ctrl+V.


2 Answers

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

like image 59
Yodacheese Avatar answered Oct 04 '22 14:10

Yodacheese


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 👍 the issue to add to its social signal.

like image 30
Joe Avatar answered Oct 04 '22 14:10

Joe