How To Add/Remove Line Breaks To/From Your Code
Follow the steps below to configure the code style for blank lines and apply this style to all the code in your project:
- Open CodeRush configuration using the CodeRush | Options menu item.
- Open the Editor | C# | Formatting | Blank Lines options page.
Configure the maximum number of blank lines in your code using the Excessive Blank Lines group:
Configure the number of blank lines between different code elements. For instance, you can add line breaks before and/or after the #region directives.
- Configure other formatting options to match your code style.
- Switch to the Editor | C# | Code Cleanup options page.
Check the Format document item and uncheck any unnecessary items.
- Save the configuration using the OK button.
- Open a source code file.
Use the Code Cleanup toolbar button to run Code Cleanup.
You can perform Code Cleanup on the entire project using the Cleanup Project item in the project's context menu.