Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Aligning Multiline Edit Cursors With Visual Studio Code

With Visual Studio Code's multiline edit functionality, is there a way to easily align all cursors in a column at the end of a line if the whitespace doesn't already exist (similar to what is possible with Notepad++)?

From this:

enter image description here

To this:

enter image description here

like image 200
Nicholas Avatar asked Jul 24 '26 06:07

Nicholas


1 Answers

There is this extension by Mike Moore

https://marketplace.visualstudio.com/items?itemName=yo1dog.cursor-align

First I install the above extension.

Test Test               <- Space here
even longer test text
testing

Selected multiple cursor as shown by |

Test Test               |
even longer test text|
testing|

Then in command pallet (ctrl+p) and (shift+>) I type Align Cusor. Else I use Alt+A. Giving you this desired result

Test Test               |
even longer test text   |
testing                 |
like image 86
Brian Avatar answered Jul 27 '26 12:07

Brian