Skip to content

Commit 41ea4d9

Browse files
author
mikeblome
committed
new images and text for setting preferences
1 parent 1c23c31 commit 41ea4d9

8 files changed

Lines changed: 45 additions & 9 deletions

docs/ide/how-to-set-preferences.md

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,64 @@
11
---
22
title: "How to set your preferences"
3-
ms.date: "09/20/2019"
3+
ms.date: "09/24/2019"
44
---
55

6-
# How to set your preferences in Visual Studio
6+
# How to set your C++ coding preferences in Visual Studio
77

8-
You can customize many aspects of Visual Studio to suit your personal preferences. You can create and store multiple sets of preferences; for example, you can define one window and toolbar layout and color scheme for unit testing, and another for debugging.
8+
You can customize many aspects of Visual Studio to suit your personal preferences. You can customize the menus and toolbars, arrange the window layout, set color themes, specify C++ formatting rules, including several flavors of ClangFormat, and create custom keyboard shortcuts. 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 which provide additional custom behavior. Many of these options are documented under [Personalize the Visual Studio IDE](/visualstudio/ide/personalizing-the-visual-studio-ide).
99

1010
## Arrange window layout
1111

12-
Within the Visual Studio window, the space is divided into the main menu, the toolbar, the code editor (or document window), and tool windows (**Solution Explorer**, **Error List**, and so on). The default layout is shown below:
12+
Within the Visual Studio window, the space is divided into the main menu, the toolbar, the code editor (or document window), and tool windows (**Solution Explorer**, **Error List**, and so on). The default layout is shown below:
1313

1414
![Default window layout](media/window-layout-default.png)
1515

16-
If you prefer to see only the code editor, press **Alt** + **Shift** + **Enter** to enter *full-screen mode*.
16+
To hide all the tool windows, press **Alt** + **Shift** + **Enter** to toggle *full-screen mode*.
1717

1818
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 between them by clicking on 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. 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).
1919

20-
## Set coding styles and formatting
20+
## Set C++ coding styles and formatting
2121

22-
You can
22+
You can specify many individual code formatting options such as indentation and brace positions by navigating to **Tools** > **Options** > **Text Editor** > **C/C++** > **Formatting**. Alternatively, you can specify one of the [ClangFormat](https://clang.llvm.org/docs/ClangFormat.html) styles (or your own custom ClangFormat style):
2323

24-
## Customize code colorization
24+
![ClangFormat options](media/clang-format-ide.png)
2525

2626
## Set the color theme
2727

28-
## Create keyboard shortcuts
28+
To set a light or dark background, navigate to **Tools** > **Options** > **Environment** and choose **Color Theme**:
29+
30+
![Color themes](media/tools-options-color-theme.png)
31+
32+
The following image shows the dark theme:
33+
34+
![Dark theme](media/tools-options-dark-theme.png)
35+
36+
## Customize code colorization
37+
38+
Regardless of which theme is active, you can customize the font and colors for individual code elements by navigating to **Tools** > **Options** > **Environment** > **Fonts and Colors**. Scroll down the list of display items until you see the C++ options:
39+
40+
![C++ font and color options](media/tools-options-cpp-colors.png)
41+
42+
## Customize the toolbars
43+
44+
The toolbars provide a convenient way to issue commands with a single mouse-click, rather than using the menus or keyboard shortcuts. Visual Studio includes a standard set of toolbars. For standard C++ development, the most useful toolbars are probably Standard, Text Editor, Build, Debug, Source Control, and possibly Compare Files. For Windows development, the Dialog Editor and Image Editor are useful for laying out dialogs and editing icons.
45+
46+
Hover over the icons in the toolbar to see which command it represents:
47+
48+
![Toolbar QuickInfo](media/toolbar-mouse-hover.png)
49+
50+
You can add or remove commands or create a custom toolbar by clicking the down-arrow. To move the toolbar to a new location, drag it by the dotted bar on the left:
51+
52+
![Customize or move a toolbar](media/toolbar-move-edit.png).
53+
54+
For more information, see [How to: Customize menus and toolbars in Visual Studio](/visualstudio/ide/how-to-customize-menus-and-toolbars-in-visual-studio).
55+
56+
## Show or hide line numbers
57+
58+
To specify whether line numbers show on the left of the editor windows, navigate to and check or uncheck **Line Numbers**:
59+
60+
![Line numbers](media/tools-options-line-numbers.png)
61+
62+
## Create keyboard shortcuts
63+
64+
All commands in Visual Studio can be made with keyboard shortcuts using various combinations of keys with the Ctrl, Alt and Shift keys. You can create your own shortcuts by navigating to **Tools** > **Options** > **Environment** > **Keyboard**. For more information, see [Identify and customize keyboard shortcuts in Visual Studio](/visualstudio/ide/identifying-and-customizing-keyboard-shortcuts-in-visual-studio).
29.6 KB
Loading
9.02 KB
Loading
9.33 KB
Loading
17.7 KB
Loading
39.5 KB
Loading
27.6 KB
Loading
25.3 KB
Loading

0 commit comments

Comments
 (0)