Question

Given the following XAML snippet, assume the caret is right before the G in Green.

<Ellipse Fill="Green"/>

Is there a Visual Studio command that deletes the existing attribute value and allows me to start typing with Intellisense support?

Ctrl+Shift+W does the trick but is very awkward.

I was hoping there was actually a command for this specific purpose that I could map to an efficient shortcut.

Was it helpful?

Solution

  1. In VS, go to Tools->Options screen.
  2. In the tree view on the left, select Environment->Keyboard.
  3. In "Show commands containing:" text box, enter Edit.SelectCurrentWord. This entry should be selected in the list box below the text box.
  4. Put cursor (focus) in text box labeled "Press shortcut keys:" and press desired shortcut.

Just a bear in mind that VS has a lot of shortcuts and most probably the shortcut that you desire is already assigned to another command. The dialog will alert you if you do and you'd have a choice whether to re-assign the shortcut or not.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top