Datasheet
Customizing the Text Editor
In addition to being able to customize the overall environment provided by Visual Studio, you can customize
several specifi c elements related to your development environment. More so than in any previous version,
the capability to modify the environment has been enhanced. With Visual Studio 2010, the user interface
components have been rewritten using WPF so that the entire display provides a much more graphical
environment and better designer support.
Both Visual Studio 2010 and Visual Basic 2010 Express Edition have a rich set of customizations related
to a variety of different environment and developer settings. Admittedly, Visual Studio 2010 ’ s feature set
offers a larger number of options for editing, but rest assured that the Express Edition contains many more
options for editing than most people expect. For example, common to both IDEs is a text editor that allows
for customization. If you ’ ve ever had to show code to an audience — for example, in a group code review —
the capability to adjust things such as font size and other similar options is great.
To leverage Visual Studio ’ s settings, select Tools
➪ Options to open the Options dialog, shown in
Figure 1 - 16. Within the dialog, make sure the Show all settings check box is selected. Next, select the
Text Editor folder, and then the All Languages folder. This section enables you to make changes to the text
editor that are applied across every supported development language. Additionally, you can select the Basic
folder to make changes that are specifi c to how the text editor behaves when you edit VB source code.
FIGURE 1 - 16
From this dialog, it is possible to modify the number of spaces that each tab will insert into your source code
and to manage several other elements of your editing environment. Within this dialog you see settings that are
common for all text editing environments, as well as the ability to customize specifi c settings for specifi c languages.
For example the section specifi c to Visual Basic includes settings that allow for word wrapping and line numbers.
One little - known but useful capability of the text editor is line numbering. Checking the Line numbers check box
will cause the editor to number all lines, which provides an easy way to unambiguously reference lines of code.
Visual Studio also provides a visual indicator so you can track your changes as you edit. Enabling the Track
changes setting under the Text Editor options causes Visual Studio to provide a colored indicator in places where
you have modifi ed a fi le. This indicator appears as a colored bar at the left margin of your display. It shows
which portions of a source fi le have been recently edited and whether those changes have been saved to disk.
IntelliSense, Code Expansion, and Code Snippets
One of the reasons why Microsoft Visual Studio is such a popular development environment is because it
was designed to support developer productivity. That sounds really good, but let ’ s back it up. People who
Project ProVB_VS2010
❘
33
CH001.indd 33CH001.indd 33 4/5/10 11:56:49 AM4/5/10 11:56:49 AM