Skip to content

Tip 1.16: How to navigate forward and backward in the editor all because of go-back markers

August 19, 2014

“Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio“, courtesy of ‘Sara Ford’

Sara Ford’s Blog

In the standard toolbar, there are Navigate Backward and Navigate Forward icons.

In the editor, the Navigate Backward command is bound to Ctrl+Minus, and the Navigate Forward command is bound to Ctrl+Shift+Minus. She finds these commands most helpful when navigating around multiple files or jumping through call stacks.

This concludes your “Basic Editor Navigation 101” course. Now it is time for the “Advanced Editor Navigation 201” course.

You may have noticed that the Navigate Backward button additionally contains a drop-down list box. Displaying the items in this list box shows you all the places that have a go-back marker. In other words, when you hit the Navigate Backward button, you are going to the most recently visited go-back marker.

If we’ve done our jobs right, the go-back navigation should feel natural. But if you’re like her, you like to know the little ins and outs of how things work.

A go-back marker is dropped under the following conditions:

  • An incremental search (including reverse) leaves a go-back marker at the beginning of the search and another one at the end.
  • A Go To Line action, like Ctrl+G, or a mouse-click that moves the cursor 11 lines or more from the current position drops a go-back marker at the new location.
  • A destructive action (like hitting Backspace) after having moved the cursor to a new location drops a go-back marker.
  • Doing a search, like Ctrl+F, drops a go-back marker at the found location.
  • Opening a file drops a go-back marker wherever the cursor was on the old file and drops another on the opened file.
  • If you’ve found a condition where you’d like to see a go-back marker dropped, let her know.

Happy Programming! =)

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: