
90
|
Chapter 3, Navigating Visual Studio
#20 Navigate Your Source Code
HACK
Go-to brace. Visual Studio includes a number of commands that will jump to
the next occurrence of a code element. Possibly the most useful is Edit.
GoToBrace (Ctrl-]), which will jump to the corresponding brace, parenthe-
sis, or bracket in the document. If the cursor is on a closing brace, it will
jump back to the opening brace; if the cursor is on the opening brace, it will
jump to the closing brace. This keystroke will work only when the cursor is
on a line that includes a brace and only with languages that use braces (C#,
C++, etc.).
End and Home. Visual Studio also supports the End and Home keys through
the commands Edit.LineEnd and Edit.LineStart. Pressing the End or Home
key will move you to the end of the current line or the start of the current
line, respectively. Visual Studio also includes two commands called Edit.
DocumentEnd and Edit.DocumentStart (Ctrl-End and Ctrl-Home), which
will move you to the end or beginning of the current document.
Bookmarks
Bookmarks are one of the few computing analogies that make perfect sense.
Bookmarks allow you to mark a place in your code that you want to come
back to, just like a regular bookmark you would use in a paper book. Creat-
ing and using bookmarks is incredibly easy and when used properly can save
time that would otherwise be wasted scrolling and searching with the
mouse. ...