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 match
  • Ctrl + 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:

  1. Open menu Tools -> Options -> Keyboard
  2. Search for command "Edit.Duplicate" command and remove Ctrl+D shortcut
  3. Then search for "Edit.InsertNextMatchingCaret" and assign Ctrl+D shortcut to this command
  4. And finally search for "Edit.InsertCaretsatAllMatching" and assign Alt+F3 shortcut to this command
  5. 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
written by
Oleg Savchuk

Chicago based Software Developer with 20+ years of experience and a passion for building high quality, pragmatic, custom software solutions.