How to replicate SublimeText ctrl+D in Visual Studio

I am used to work with Sublime text and trying to switch for Visual Studio for bigger projects, one of the feature of sublime that I absolutely love is its multiple select feature. You can hit ctrl + d multiple times to select next instance of the same word and then rewrite them all at once. Is there anything like this in Visual studio? I tryed to find it, but with no success.

Btw I am using Visual Studio 2015.

Upvotes: 39

Views: 28291

Answers (7)

Madacol
Madacol

Reputation: 4316

Visual studio 2017-2022

The default shortcut is Alt+Shift+.


But if you want to add Ctrl+D

  • Go to the menu Tools > Options then select the Keyboard tab on the left

At the top you'll find an option to add extra keybindings, select Visual Studio Code. Save and That's it! Setting

This works because Visual Studio Code has Ctrl+D, and other shortcuts similar to SublimeText

Alternatively you can manually add shortcuts

In the image, you can find any command to customize in the middle section.

The particular command you are interested is the one selected Edit.InsertNextMatchingCaret

Upvotes: 72

user27303983
user27303983

Reputation: 1

Screenshot

Simply use visual studio code keyboard mapping

Upvotes: 0

marsh-wiggle
marsh-wiggle

Reputation: 2813

  • Goto Tools / Options / Keyboard
  • Search for duplicate
  • Choose Edit.Duplicate
  • Remove the assignement for the current shortcut
  • Assign the shortcut you want

enter image description here

Upvotes: 1

Shnd
Shnd

Reputation: 2070

I decided to use this Visual Studio Extension:

https://marketplace.visualstudio.com/items?itemName=JustinClareburtMSFT.SublimeVS

Upvotes: 0

andrezi
andrezi

Reputation: 39

Ctr R, R, this is used to replace the name of the varibals, depronto can serve it.

and you are encouraged here are all the shortcuts of vs2015 http://visualstudioshortcuts.com/2015/

Upvotes: 2

Syed Zain Ali
Syed Zain Ali

Reputation: 1226

Use Alt +leftClick and ctrl+F2 . For more reference you can go Official Website [link]https://code.visualstudio.com/docs/getstarted/keybindings#_keyboard-shortcuts-reference

Upvotes: 0

NTP
NTP

Reputation: 399

Ctrl + Shift + L seems to work.

Upvotes: -2

Related Questions