You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ide/cpp-linter-overview.md
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,9 @@ monikerRange: ">=msvc-160"
16
16
17
17
The IntelliSense code linter for C++ helps developers find and fix common C++ problems right inside Visual Studio. It's based on the same engine that provides C++ IntelliSense, so problems are flagged as soon as you type them.
18
18
19
-

19
+
:::image type="complex" source="media/linter-demo-animation.gif" alt-text="Animation showing the C plus plus linter in action.":::
20
+
As the user types if (i = 3), a popup appears suggesting the correction i == 3, which is selected and updates the code to read if (i == 3)
21
+
:::image-end:::
20
22
21
23
## Find problems
22
24
@@ -26,7 +28,7 @@ Starting in Visual Studio 2022, the C++ Linter is enabled by default. To use it,
26
28
27
29
Most of the linter checks have suggestions for fixing the problem. Hover over the error squiggle and choose the light bulb that pops up to see the suggestions. A preview diff of the suggested change is shown, so you can confirm the change makes sense before you apply it.
28
30
29
-
## <aname="configure-the-linter"> Configure the linter
31
+
## Configure the linter
30
32
31
33
You can enable or disable the linter, or configure the severity level for each check, in the C++ Code Style options.
32
34
@@ -38,7 +40,7 @@ When you change the check severity level, it changes how the problem is shown in
38
40
39
41
::: moniker range=">=msvc-170"
40
42
41
-

43
+

42
44
43
45
(The presentation in Visual Studio 2019 is slightly different, but the options are similar.)
Copy file name to clipboardExpand all lines: docs/ide/how-to-set-preferences.md
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,15 @@ You can make your C++ coding experience more convenient, productive, and pleasur
16
16
- Specify C++ formatting rules, including several styles of ClangFormat.
17
17
- Create custom keyboard shortcuts.
18
18
19
-
You can synchronize your preferences across multiple machines, and create and store multiple sets of preferences and share them with teammates. You can install extensions from the Visual Studio Marketplace, giving you additional options for customizing behavior. For more information, see [Personalize the Visual Studio IDE](/visualstudio/ide/personalizing-the-visual-studio-ide).
19
+
You can synchronize your preferences across multiple machines, and create and store multiple sets of preferences and share them with teammates. You can install extensions from the Visual Studio Marketplace, giving you more options for customizing behavior. For more information, see [Personalize the Visual Studio IDE](/visualstudio/ide/personalizing-the-visual-studio-ide).
20
20
21
21
## Arrange window layout
22
22
23
23
Within the Visual Studio window, the space is divided into the main menu, the toolbar, the code editor (or document window), and tool windows (such as Solution Explorer and Error List). Some windows overlap each other in the same position. For example, Solution Explorer, Class View, Resource View, and Source Control Explorer all share the same default position. You switch among them by selecting the tabs at the bottom of the frame. To make two or more of these windows visible at the same time, just drag one of them by its title bar to a new position. You can dock it against one of the Visual Studio main window borders, or you can float it.
24
24
25
25
The following screenshot shows the **Team Explorer** window being dragged from its default position to a new, docked position on the left side of the code editor. The blue shaded area shows where the window will be placed when the mouse button is released.
26
26
27
-

27
+

28
28
29
29
In the document window, each open file is contained in a tabbed frame. You can float or lock these tabs, just like tool windows. For more information, see [Customize window layouts in Visual Studio](/visualstudio/ide/customizing-window-layouts-in-visual-studio).
30
30
@@ -34,33 +34,33 @@ To hide all the tool windows and maximize the Code Editor window, press **Alt**
34
34
35
35
You can specify many individual code formatting options, such as indentation and brace positions. To do so, go to **Tools** > **Options** > **Text Editor** > **C/C++** > **Formatting** (or type **Ctrl + Q** and search for "Formatting"). Alternatively, you can specify one of the [ClangFormat](https://clang.llvm.org/docs/ClangFormat.html) styles (or your own custom ClangFormat style).
36
36
37
-

37
+

38
38
39
39
For more information about all the formatting options, see [Options, Text Editor, C/C++, Formatting](/visualstudio/ide/reference/options-text-editor-c-cpp-formatting).
40
40
41
41
## Set the color theme
42
42
43
43
To set a light or dark background, type **Ctrl + Q** and search for "Color Theme". You can also find these by going to **Tools** > **Options** > **Environment**, and choosing **Color Theme**.
44
44
45
-

45
+

46
46
47
47
For example, here's the dark theme:
48
48
49
-

49
+

50
50
51
51
## Customize code colorization
52
52
53
53
In Visual Studio 2019, you can choose from three predefined *color schemes*. These specify how code elements are colorized in the editor. To choose a theme, go to **Tools** > **Options** > **Text Editor** > **C/C++** > **View**, and choose **Color Scheme**:
54
54
55
-

55
+

56
56
57
-
In the color scheme called **Visual Studio 2017**, most code elements are simply black. In the **Enhanced** color scheme, functions, local variables, macros, and other elements are colorized. In the **Enhanced (Globals vs. Members)** scheme, global functions and variables are colorized to contrast with class members. The default mode is **Enhanced**, and it looks like this:
57
+
In the color scheme called **Visual Studio 2017**, most code elements are black. In the **Enhanced** color scheme, functions, local variables, macros, and other elements are colorized. In the **Enhanced (Globals vs. Members)** scheme, global functions and variables are colorized to contrast with class members. The default mode is **Enhanced**, and it looks like this:
58
58
59
-

59
+

60
60
61
61
Regardless of which theme or color scheme is active, you can customize the font and colors for individual code elements. To do this, go to **Tools** > **Options** > **Environment** > **Fonts and Colors** (or type **Ctrl + Q** and search for "Fonts"). Scroll down the list of display items until you see the C++ options.
62
62
63
-

63
+

64
64
65
65
Colors that you set here override the values defined for the color schemes. If you want to go back to the default colors for the color scheme, set a color back to **Default**.
66
66
@@ -70,19 +70,19 @@ The toolbars provide a convenient way to issue commands with a single click, rat
70
70
71
71
Hover over the icons in the toolbar to see which command it represents:
72
72
73
-

73
+

74
74
75
75
You can add or remove commands, or create a custom toolbar, by selecting the down-arrow. To move the toolbar to a new location, drag it by the dotted bar on the left.
76
76
77
-
.
77
+
.
78
78
79
79
For more information, see [How to: Customize menus and toolbars in Visual Studio](/visualstudio/ide/how-to-customize-menus-and-toolbars-in-visual-studio).
80
80
81
81
## Show or hide line numbers
82
82
83
83
You can specify whether line numbers show on the left of the editor windows. In **Options**, under **C/C++**, select **General**. In the **Settings** section, select or clear **Line numbers**, depending on your preference.
84
84
85
-

85
+

Copy file name to clipboardExpand all lines: docs/ide/live-share-cpp.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,13 @@ ms.date: "05/24/2019"
7
7
8
8
In Visual Studio 2019 and Visual Studio Code, you can use **Live Share** to collaborate on C++ projects in real-time. With **Live Share** another person can edit and debug your code without having to install your project or any of its dependencies. You see each other's edits as they occur, and each edit is tagged with the name of the person who made it.
9
9
10
-

10
+

11
11
12
12
## Live Share host and guests
13
13
14
-
In a Live Share session there is a host and one or more guests. Both host and guests can use either Visual Studio or Visual Studio Code. A Visual Studio 2019 host on Windows can share with a Visual Studio Code guest on Linux.
14
+
In a Live Share session, there's a host and one or more guests. Both host and guests can use either Visual Studio or Visual Studio Code. A Visual Studio 2019 host on Windows can share with a Visual Studio Code guest on Linux.
15
15
16
-
The host provides the guests with everything they need to be productive. Guests are not required to have the source code, compiler, external dependencies, or even the same installed components.
16
+
The host provides the guests with everything they need to be productive. Guests aren't required to have the source code, compiler, external dependencies, or even the same installed components.
17
17
18
18
The host and guests can use these IntelliSense features:
19
19
@@ -27,7 +27,7 @@ The host and guests can use these IntelliSense features:
27
27
- Reference Highlighting
28
28
- Diagnostics/Errors/Squiggles
29
29
30
-

30
+

0 commit comments