Software Developer Notes
Miscellaneous notes for more efficient development
How to configure Visual Studio multiple cursors to use Sublime Text key shortcuts
Multiple cursors (or Multi-Caret) feature is very useful in code editing. However, editors can implement it in different ways with different keyboard shortcuts.
For example, in Visual Studio 2017 or 2019 the following shortcuts are default:
Shift+Alt+.
to add next matchCtrl + Alt + Shift + ;
to grab all
If you use Sublime Text source code editor, along with Visual Studio, you will want to use the same convenient shortcuts available in both (Ctrl+D
and Alt+F3
).
Steps to do in Visual Studio 2017 or 2019:
- Open menu Tools -> Options -> Keyboard
- Search for command "Edit.Duplicate" command and remove
Ctrl+D
shortcut - Then search for "Edit.InsertNextMatchingCaret" and assign
Ctrl+D
shortcut to this command - And finally search for "Edit.InsertCaretsatAllMatching" and assign
Alt+F3
shortcut to this command - Done!
Just an FYI if you want to revert it back:
Ctrl+D
by default is assigned to "Edit.GoToFindCombo" command (and sometimes to "Edit.Duplicate" for some reason, so we had to remove it first)Alt+F3
by default assigned to "Edit.StopSearch" command