How to: Undo and Redo Global Actions

Visual Studio 2010

In addition to the typical undo and redo functionality that affects only individual files, the Visual Studio editor includes commands to undo or redo global actions that affect multiple files.

Global actions include renaming a class or namespace, performing a find-and-replace operation across a solution, refactoring a database, or any other action that changes multiple files.

You can apply the global undo and redo commands to actions in the current Visual Studio session, even after you close the solution that an action applies to.

The text of the global undo command depends on the most recent global action, and has the form Undo Global *action. For example, if you change the name of a class from Class1 to Class2, the command text is Undo Global *Rename 'Class1' to 'Class2'. If no global actions are stored in memory, the command text is Undo Last Global Action, which is dimmed.

To undo a global action

  • On the Edit menu, click Undo Global *action.

The global redo command resembles the global undo command.

To redo a global action

  • On the Edit menu, click Redo Global *action.

Community Additions