Reputation: 95
I've been transitioning to using VS Code for my python projects after previously working with the full Visual Studio, and some of the key bindings/features I'm used to in Visual Studio I can't find the equivalent for in VS Code. I'm not sure if the bindings are different or if the feature doesn't exist.
One feature in particular that I can't figure out is if it is possible to do multi-line select past line endings. In Visual Studio, using Alt + Click
+ Drag
, lets you create a multi-line cursor or box selection, that can extend past line ends, implicitly adding spaces as needed so that the right-most side of the box stays uniform. In VS Code, if you drag the selection past the end of a line, the selection box won't go past the end of the line, even if other lines in the selection extend past it. In Visual Studio, this feature even goes further, as you could Alt + Click
+ Drag
even in areas with no characters as all, creating a multiline cursor or box selection to the right of all existing line ends.
This isn't an essential feature, but it's very handy in making code easy to read. For example, when assigning several dictionary entries all at once, with varying key lengths. Is it possible to do something like this in VS Code?
Edit: The feature I'm looking for is virtual spaces
(thank you Mark for providing the feature name), which seems to be an outstanding feature request in VS Code.
Upvotes: 0
Views: 1505
Reputation: 1
Notepad++ has this very helpful feature. You can hover the mouse on a column that is past the eol on any line and with Alt+Left-Click you get the cursor right where you'd like to start writing way far right from the previous eol. This is also something that is needed in VS Code.
Upvotes: 0
Reputation: 1
In fact it is possible. Select the beginning of the lines with "Alt-Shift", then press "END" key and the cursor is blinking at the end of all lines, where you can insert the same text. Verified on VS Code v.1.84.2.
Upvotes: 0
Reputation: 180631
The short answer is no, vscode does not have a box select, past line ends, built-in. VS Code does not have the concept of virtual spaces
which would be necessary to make this work yet.
Below is the issue, lots of comments, not that many upvotes. Upvote it.
https://github.com/microsoft/vscode/issues/5402
Upvotes: 2