söndag 11 mars 2018

Multi-cursor editing in Visual Studio Code, edit many places simultaneously!

Did some pair programming with @nevva and saw him do some multi-cursor editing in Visual Studio Code I hadn't seen before. So here's three different ways to edit your text files at multiple places simultaneously.

Use Esc to exit multi-cursor mode.

1. Ctrl + Alt + arrow down (or arrow up)
A simpler variant of this in the classic Visual Studio is Shift + Alt + any arrow

2. Alt + left mouse click

3. Mark some text => all occurrences gets highlighted
Ctrl + Shift + L => every occurrence gets its own cursor