Jump to the Top or Bottom of the Current View in the Editor

Keyboard:  CTRL + PgUp; CTRL + PgDnCommand:  Window.NextTab; Window.PreviousTabVersions:  2008,2010Published:  5/18/2010Code:  vstipEdit0056   Let’s say you are at the bottom of your screen writing some code:   But you realize you need to pop up to the top of the screen real quick to correct something.  Not an issue.  Just press CTRL + PgUp and…

0

Using the Undo and Redo Stack

Keyboard:  CTRL + Z (undo); ALT + BACKSPACE (undo); CTRL + SHIFT + Z (redo); ALT + SHIFT + BACKSPACE (redo); CTRL + Y (redo)Menu:  Edit -> Undo; Edit -> RedoCommand:  Edit.Undo; Edit.RedoVersions:  2008,2010Published:  4/11/2010Code:  vstipEdit0045 Download the seriously cool Tip of the Day Extension to get the daily tips delivered to your Start Page!…

4

Cut or Delete the Current Line

Keyboard:  CTRL + L (cut text); SHIFT + DEL(cut text and carriage return); CTRL + X(cut text and carriage return); CTRL + SHIFT + L (delete)Command:  Edit.LineCut; Edit.Cut; Edit.Cut; Edit.LineDeleteVersions:  2008,2010Published:  4/4/2010Code:  vstipEdit0038   You can quickly and easily do a cut operation by doing the following: Place your cursor on any line: Do one…

10

Cut, Copy, and Paste Collapsed Code with Outlining

Keyboard:  CTRL + M, CTRL + M (toggle outlining expansion) Menu:  Edit -> Outlining -> Toggle Outlining Expansion Command:  Edit.ToggleOutliningExpansion Versions:  2008,2010Published:  3/21/2010Code:  vstipEdit0035   When working with Outlining, you can perform many timesaving operations.  One of those is the ability to take a long, funky chunk of code and work with it in a…

1

Turn Off the Selection Margin

Menu:  Tools -> Options -> Text Editor -> General -> Display Versions:  2008,2010Published:  3/20/2010Code:  vstipEdit0034   For those that aren’t familiar with it, the Selection Margin is the place between line numbers and the outline indicators.  It is used to show code changes and to allow you the ability to select an entire line of…

0

Turn Off or On Outlining

Keyboard:  CTRL + M, CTRL + P (stop outlining) Menu:  Edit -> Outlining -> Stop Outlining; Edit -> Outlining -> Start Automatic Outlining Command:  Edit.StopOutlining; Edit.OutliningStartAutomaticOutliningVersions:  2008,2010Published:  3/19/2010Code:  vstipEdit0033   If you don’t like the Outlining feature in Visual Studio:   You can turn it off one of two ways: Hit CTRL + M, CTRL…

9

Collapsing or Expanding All Your Code with Outlining

Keyboard:  CTRL + M, CTRL + L Menu:  Edit -> Outlining -> Toggle All Outlining Command:  Edit.ToggleAllOutliningVersions:  2008,2010Published:  3/17/2010Code:  vstipEdit0031   You can easily collapse or expand ALL your code with Outlining.  For example, if you have a bunch of code that is expanded:   And want it all collapsed, then you have two options:…

0

Expanding Your Code with Outlining

Keyboard:  CTRL + M, CTRL + M Menu:  Edit -> Outlining -> Toggle Outlining Expansion Command:  Edit.ToggleOutliningExpansionVersions:  2008,2010Published:  3/16/2010Code:  vstipEdit0030   By default, Outlining is enabled in Visual Studio.  When you encounter a collapsed area of code like this:   You can expand it again.  There are three ways to do this: 1.  Click on…

0

How to Convert Tabs to Spaces and Vice Versa

Menu:  Edit -> Advanced -> Tabify Selected Lines; Edit -> Advanced -> Untabify Selected Lines Command:  Edit.TabifySelectedLines; Edit.UntabifySelectedLines;Edit.ConvertTabsToSpaces;Edit.ConvertSpacesToTabs Versions:  2008,2010Published:  3/14/2010Code:  vstipEdit0028   Some people prefer spaces, others prefer tabs.  Well you can have it any way you want it with this next item.  You can convert spaces to tabs and convert tabs to spaces…

10

Reuse the Same Editor Window When Opening Files

Menu:  Tools -> Options -> Environment -> DocumentsVersions:  2008,2010Published:  3/10/2010Code:  vstipEdit0027     Normally, when you open up a new document it creates a new tab: Default (before):   Default (after):     But if you go to Tools -> Options -> Environment -> Documents and check the “Reuse current document window, if saved” option…

1