简体   繁体   中英

Visual Studio 2015 C# hotkey to collapse containing region

I use lots of #region to organize my C# codes and one very-often thing I have to repeat is collapse and/or expand the #region area by clicking on the button lie at the #region containing line - ie the one marked with @1 as the below snapshot.

It would be lovely to be able to have a hotkey so that we can quickly collapse/expand the current region that contains the current line where the caret is in.

My google search comes up little helps so I ask here.

Is it possible and how can we archive that?

在此处输入图片说明

Ctrl+M, Ctrl+S is used to expand or collapse the current region

from MSD

With visual studio defaults you can:

  • Collapse current region ctrl + m , ctrl + s . Command Edit.CollapseCurrentRegion
  • Expand current region ctrl + m , ctrl + e . Command Edit.ExpandCurrentRegion

Try to set it up or find out your settings for these commands in Options->Environment->Keyboard

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM