Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
strauss_d_getting_started_with_visual_studio_2022_learning_a.pdf
Скачиваний:
123
Добавлен:
26.06.2023
Размер:
17.04 Mб
Скачать

Chapter 2 Working with Visual Studio 2022

Figure 2-80.  Adjust line spacing

Admittedly, the options might not suit everyone, and I hope that Visual Studio allows custom values to be entered here in a future release. Nevertheless, being able to space the lines of code vertically is a quality-of-life improvement for many developers that spend most of their working day in front of Visual Studio.

Document Management Customizations

There are several small but welcome changes to how developers manage documents. The Document Tabs group under Tools, Options, Environment, Tabs, and Windows has had several new options added compared to previous versions of Visual Studio. Let’s have a look at some of these.

157

Chapter 2 Working with Visual Studio 2022

The Document Close Button

Developers now have options when deciding how to show the close button for documents. You now have the option to add the close button to the document well, as seen in Figure 2-81.

Figure 2-81.  Show close button in document well

You can also remove the close button from the individual document tabs, as seen in Figure 2-82, leaving you with a single close button.

Figure 2-82.  Remove close button on tabs

You can also opt to remove the close button from the document well as well as from the document tab. You can then right-click the document to close it.

Modify the Dirty Indicator

Developers can now choose how they would like to display dirty tabs. The default is an asterisk to the right of the file name, as seen in Figure 2-83.

Figure 2-83.  The default dirty indicator

You can also change this indicator to be a dot, as seen in Figure 2-84.

Figure 2-84.  The dot dirty indicator

158

Chapter 2 Working with Visual Studio 2022

The dot does make the tab slightly bigger, but it is a more explicit indicator that the document has unsaved changes. What is nice, however, is that if you have set the close button to be visible on document tabs, the dot will change into a close button when you hover over it.

Show Invisible Tabs in Italics in the Tab Drop-Down

The ability to display hidden tabs in italics is something you might not know that you want until you see it in action. The tab drop-down displays all your open tabs, as seen in Figure 2-85.

Figure 2-85.  Invisible tabs not in italics

The trick is knowing which documents are currently visible and which are not. With this option set to show hidden documents in italics, the hidden tabs are immediately discernable, as seen in Figure 2-86. This is especially helpful when looking

at that Program.cs file.

Figure 2-86.  Invisible tabs displayed in italics

159

Chapter 2 Working with Visual Studio 2022

Colorize Document Tabs

I’m sure the images displayed here will not be in color if you read the print book. Showing the color changes on tabs will, therefore, not make sense. Instead, I will show you where you can change this option.

As seen in Figure 2-87, you can colorize document tabs by Project or File Extension (or choose no coloring, which is the default). Playing around with this option allows you to find a setting that is convenient for you.

Figure 2-87.  Colorizing document tabs

If you don’t like the default color for the tab, right-click the tab and select the Set Tab Color option to choose a color more to your liking.

Being able to colorize document tabs help developers cut through the noise when working in multiple tabs, especially on large projects.

Tab Placement

The ability to choose the tab placement is something many of you might welcome.

160

Chapter 2 Working with Visual Studio 2022

As seen in Figure 2-88, the tabs can be displayed on the left or, as in Figure 2-89, on the right.

Figure 2-88.  Document tabs on the left

Figure 2-89.  Document tabs on the right

The left and right placement of tabs also highlights the color options better.

161