Create keyboard shortcut to regionate method
keyboard-shortcuts, visual-studio
Solution
I am not sure about the GhostDoc auto documentation, but to regionate selected text you can use the "surround with" function in Visual Studio.
Select a portion of code and press Ctrl + K, S. This brings up the "surround with" context menu. Select "region" in the menu, type in your region name and you're all set.
This function can be used for a bunch of other stuff as well. If, for, while and try statements and so on.
Problem
Can I in Visual Studio create keyboard shortcut to regionate method and auto-document it with GhostDoc? From this: ``` protected override void OnInit(EventArgs e) { base.OnInit(e); } ``` I want make this: ``` #region protected override void OnInit(EventArgs e) /// <summary> /// Raises the <see cref="E:Init"/> event. /// </summary> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected override void OnInit(EventArgs e) { base.OnInit(e); } #endregion ```