Visual Studio 2017 and multi-caret support with 15.8 update

Posted: (EET/GMT+2)

 

Visual Studio 2017 version 15.8 added multi-caret editing support, a feature that many text editors and IDEs have already had. The multi-caret features lets you place multiple cursors in the editor and type or edit in several places at once.

To add extra carets:

  • Hold Ctrl+Alt and click in those places where you want a new caret.
  • Or, hold Ctrl+Alt and press the arrow keys to create vertical carets across lines.
  • You can also use Ctrl+Alt+Shift+. and Ctrl+Alt+Shift+, to add or remove carets.

The cancel multiple carets, simply click (without holding any keyboard keys) anywhere in the Code Editor, or press Esc.

Once the carets are active, typing affects all locations simultaneously. You can add commas, rename identifiers, or align assignments easily without complex find-replace operations.

Happy code editing!