Reputation: 6175
I'm currently experimenting with VS Code, having used Sublime Text 3 for the last five years or so. In Sublime, I could quickly swap two lines by selecting them both and then doing Ctrl+T.
As far as I've been able to find, the only equivalent command in VS Code is Alt+↑/↓, which pushes the selected line either up or down, and would be excruciatingly slow unless the selections are very close to each other.
Is this still true as of 2019? Is this basic functionality really not possible in VS Code?
Upvotes: 0
Views: 4784
Reputation: 29699
There is no built-in functionality.
You can use a combination of VS Code's multi-cursor selection and the Swap extension.
Windows: CTRL+ALT+8
Mac: CMD+OPTION+8
You can customize the keyboard shortcut to be same as what you used in Sublime.
Upvotes: 3