Skip to content

Commit 6bc2d52

Browse files
committed
edits
1 parent 3a6255c commit 6bc2d52

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/ide/code-styles-and-code-cleanup.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can define code style settings per-project by using an [EditorConfig file](#
3030
::: zone pivot="programming-language-dotnet,programming-language-cpp,programming-language-dotnetf"
3131
## Code styles in EditorConfig files
3232

33-
Code style settings can be specified by adding an [EditorConfig](../ide/create-portable-custom-editor-options.md) file to your project. EditorConfig files are associated with a codebase rather than a Visual Studio personalization account. Settings in an EditorConfig file take precedence over code styles that are specified in the **Options** dialog box. Use an EditorConfig file when you want to enforce coding styles for all contributors to your repo or project. They are especially useful to ensure consistency for in a teams programming environment.
33+
Code style settings can be specified by adding an [EditorConfig](../ide/create-portable-custom-editor-options.md) file to your project. EditorConfig files are associated with a codebase rather than a Visual Studio personalization account. Settings in an EditorConfig file take precedence over code styles that are specified in the **Options** dialog box. Use an EditorConfig file when you want to enforce coding styles for all contributors to your repo or project. They are especially useful to ensure consistency in a teams programming environment.
3434

3535
To add an EditorConfig file, see [Ways to add an EditorConfig file](../ide/create-portable-custom-editor-options.md#ways-to-add-an-editorconfig-file).
3636
::: zone-end
@@ -119,7 +119,7 @@ When you change a code style in the Options page or add an EditorConfig file to
119119

120120
::: moniker range=">=vs-2022"
121121

122-
Visual Studio has a **Code Cleanup** button at the bottom of the editor (keyboard: **Ctrl**+**K**, **Ctrl**+**E**) to apply code styles from an EditorConfig file or from the **Code Style** options page. If an *.editorconfig* file exists for the project, those are the settings that take precedence.
122+
To apply code styles from an EditorConfig file or from the **Code Style** options page, use the **Code Cleanup** button at the bottom of the editor (keyboard: **Ctrl**+**K**, **Ctrl**+**E**). If an *.editorconfig* file exists for the project, those are the settings that take precedence.
123123

124124
::: zone pivot="programming-language-dotnet,programming-language-dotnetf"
125125
> [!TIP]
@@ -132,17 +132,21 @@ To apply code styles:
132132

133133
![Screenshot of Configure Code Cleanup.](media/vs-2022/configure-code-cleanup.png)
134134

135+
::: zone pivot="programming-language-cpp"
136+
C/C++ options include C++ in the name of the fixer.
137+
::: zone-end
138+
135139
1. After you've configured code cleanup, use one of the following methods to run code cleanup:
136140

137141
- Click on the broom icon or press **Ctrl**+**K**, **Ctrl**+**E**.
138142

139143
![Screenshot of Execute code cleanup.](media/vs-2022/execute-code-cleanup.png)
140144

141-
- To run code cleanup across your entire project or solution, right-click on the project or solution name in **Solution Explorer**, select **Analyze and Code Cleanup**, and then select **Run Code Cleanup**.
145+
- To run code cleanup across your entire project or solution, right-click the project or solution name in **Solution Explorer**, select **Analyze and Code Cleanup**, and then select **Run Code Cleanup**.
142146

143147
![Screenshot of Run Code Cleanup across entire project or solution.](media/vs-2022/run-code-cleanup-project-solution.png)
144148

145-
If you want your code style settings to be applied every time you save a file, go to **Options** > **Text Editor** > **Code Cleanup** and select **Run Code Cleanup profile on save**.
149+
1. (Optional) If you want your code style settings to be applied every time you save a file, go to **Options** > **Text Editor** > **Code Cleanup** and select **Run Code Cleanup profile on save**.
146150

147151
::: moniker-end
148152

3.5 KB
Loading

0 commit comments

Comments
 (0)