3

When I hit Ctrl+E+D or Ctrl+M+Space (CodeMaid), I want Visual Studio to add newlines before and after #region and #endregion in following languages: C#, CSS, JS

How I can make it happen?

For ex:

#region

Codes

#endregion

BTW, now Visual Studio remove any inserted enter on #regions.

Mehdi Dehghani
  • 10,970
  • 6
  • 59
  • 64

2 Answers2

1

By default, it's enabled if not you can make sure it's green enter image description here

LeRoy
  • 4,189
  • 2
  • 35
  • 46
0

By default, CodeMaid will insert blank line padding before/after #region and #endregion statements. There is additional logic that will prevent that from happening based on the surrounding context (e.g. if it's the first item inside a set of braces).

Note: This only applies to C#. I'm not sure what you mean by CSS and JS as neither of those languages support #pragma statements to my knowledge.

Steve Cadwallader
  • 2,656
  • 4
  • 28
  • 37