Visual Studio Keyboard Shortcut Tip: Ctrl+-

Posted by: Scott on Writing, on 24 Nov 2008 | View original | Bookmarked: 0 time(s)

I learned this Visual Studio keyboard shortcut from a client a couple of months ago. I use it several times a day now.

Typing the Ctrl key and - (the minus key) returns you to the previous cursor location, be it in the same file or in a different, open file.

Visual Studio maintains your position in a file as a stack. So as you do a Find and jump to a particular location in a file, or right-click on a method or property name and choose Go To Definition Visual Studio keeps track of your position prior to these jumps. You can then 'pop' the position off the stack and return to it by hitting Ctrl+-.

This keyboard shortcut is quite useful when you're bug hunting or trying to understand how some bit of code is working and are drilling down into methods and search results. When you are ready to return to the previous location, which could be in another file or elsewhere in the currently opened file, just hit Ctrl+- to get back! And if you need to get back to the spot before that, hit Ctrl+- again.

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Visual Studio | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2776 | Hits: 23

Similar Posts

  • Visual Studio Short Keys and Some Tips and Tricks more
  • Visual Studio Tip: Search DevExpress From IDE more
  • I can’t find my Find Dialog in Visual Studio more
  • Did you know? There are many ways to insert a snippet into your code (Lisa Feigenbaum) more
  • Visual Studio Tip: Using Code Snippets more
  • Two cool debugger tips that I learnt today more
  • Visual Studio Tips & Tricks more
  • Visual Studio Smart Tag Expansion Tip more
  • Visual Studio Shortcuts more
  • Find Type - Built In Visual Studio more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD