ssmskeyboard-shortcuts

How can I change comment and uncomment shortcuts in SSMS?


SSMS Version 19.3

I can't seem to find anything on how I changed these shortcuts in the past. I had these two changed so I could comment code out with CTRL + / and uncomment with CTRL + \
SSMS was updated and I lost those shortcuts.

This is a whole lot faster and easier than what is default. Can anyone help point me to the right place?

Tools-> Environment -> Keyboard -> Keyboard is probably where I need to be but I don't see a way to add this type of shortcut because Query Shortcuts is not what I need.


Solution

  • You need to change the binding for Edit.CommentSelection and Edit.UncommentSelection found in Environment->Keyboard->Keyboard of the Options dialogue:
    enter image description here

    By default these are bound to Ctrl+K, Ctrl+C and Ctrl+K, Ctrl+U respectively. You can bind a new shortcut bu clicking into the box below "Press shortcut keys", and then inputting the desired shortcut, and then clicking "Assign". For example Ctrl+/ for Edit.CommentSelection.