Visual Studio Tricks


Visual Studio (2005,2008,2010) Tips and Tricks.


#41 Forward and Backward navigation in Visual Studio Editor

These are great. I already knew the keyboard shortcuts, but I didn't know the toolbar tricks. For once (this is unusual) the tool bar offers a tiny bit of visual help that superceeds the use of the keybaord only tricks. Confused? That's why I like video. You will too. Watch video #41

Click Screenshot To Play Video

#41 Forward and Backward navigation in Visual Studio Editor

Runtime: 3Minutes - Resolution: 900X580 - File Size: 3.5Meg

Direct Download: If the video does not work for you,
Click Here to download it.

Snippets / Notes:

[CTRL]+ [-] = Move Back

[CTRL]+[SHIFT]+[-] = Move Forward

This work is licensed under a Creative Commons license.

Visual Studio Tip / Trick #041 English Transcription:

Today's Visual Studio Trick, Trick No. 41 was originally posted by Sara Ford in September 19th 2007. Today's trick works the same in both in Visual Studio 2005 as it does in 2008. So we'll be demoing this on 2008 product and the tip is forward and backward navigation. So if I have my cursor here and jump to another file and do something here, then jump here. If I wanna go back, the keyboard shortcut is [CTRL]+[_], or I guess that's actually a dash, so [CTRL]+[-] will take you backwards and then [CTRL]+[SHIFT]+[-] will take you forward. A lot of people know those keyboard shortcuts but a little bit of background on whats happening and actually a new little trick that I didn't know about is these toolbars. So if I hover over the backwards, so I can navigate backwards with [CTRL]+[-], and navigate forward with [CTRL]+[SHIFT]+[-], but there's also this handy little drop down arrow here which shows you the most recent files that have been opened as well as the marks that are in those files that you've gone to. So instead of just going [CTRL]+[-],[-],[-],[-],[-] and try to get back to where you were. Its pretty convenient to see this menu you can get right to a specific place in the file. Now there is some rule this happens when this back mark is actually dropped for you. So if I go to line 19-20-19-20-19-20 and I just keep going back and forth, or up-down-up-down-up-down, those are actually not dropping in backmarks, so there are some rules. And Sara outlines these in her blogs. So the first one is incremental search, so [CTRL]+[I] and everytime you find something, either moving forward or backward, there is a backmark that is dropped. If you do [CTRL]+[G] and go to a specific line, then there is a backmark that is dropped. Also if you move more than 10 lines. So if I [CTRL]+[G] from 13 to 19 and then back to 13, there is not a mark that is added. It has to be greater than 10 lines. There is a backmark that is added during a destructive options. So for example if I delete these lines, then a backmark is added that means I'll be able to navigate forward and backwards to this particular place. Then also when you do straight up [CTRL]+[F] to find, and then navigate with that Find and then finally when you open a new file, there's a backmark that is added at your current cursor position as well as the position that your cursor is on that new file. So again this works the same in both 2005 and 2008. So you at next tip trick.
Kick this Trick on DotNetKicks.com

1 comment(s)

  1.  avatar

    I have been look for that for ages, thanks !


Main RSS Feed (All Posts)

Scott Cate Main Blog FedSample topics include personal, work, community, technology, and Video Tricks.

Visual Studio Tricks Feed (New)

Scott Cate Visual Studio Tricks RSS FeedOnly contains Visual Studio Tricks. These are 99% video tricks!

Technology RSS Feed

Scott Cate Technology FeedTechnology Only! Tips, Tricks, Programming, Tech Events, and other geeky subjects.

Want Email Notifications of New VSTricks

What is your email?

Twitter @ScottCate

  • Don't forget - tonight's asp.net user group meeting - 5:30-8, info on AZGroups.org
  • Please don't assume using Twitter to communicate will get you a response. Send Email or Call. No. I didn't get your Tweet last week.
  • Don't Forget the Azure User Group in PHX meets tonight - details here http://goo.gl/MBXT
  • I have it turned on as an option in Labs. maybe it moved from Labs into core?? Check yr Lab settings (@timheuer)http://yfrog.com/1dmqtp
  • Congratulations Canada - Great Hockey Game!

Twitter @VSTricks

  • RT @zainnab: Visual Studio 2010 Tips and Tricks Begins!: Happy to announce that the New Year marks the beginning .. http://bit.ly/8pZh0O
  • Congratulations to all @VSTricks entries. @Kazuk was the winner. Video shows how the random was done http://bit.ly/8EDCwW (if u care)
  • @kazuk Congrats - you are the winner - video being posted shortly - please DM me your email
  • @leemessenger @ericfickes @DarrellHardy Trick 504 has been fixed. No login needed. http://bit.ly/71OGcF
  • OK Everyone! Trick 504 is fixed! No user/pwd needed. Debug ASP.net in any browser with #VisualStudio http://bit.ly/7QaCSi

GetClicky Web Stats

Web Analytics