Speedup your code navigation by Bookmarking your code in Visual Studio

Speedup your code navigation by Bookmarking your code in Visual Studio

You can use the Bookmark feature in Visual Studio to remember the specific line in your code with in the solution. Then you can quickly return to a specific location or jump back and forth between different bookmarks. This makes your code navigation much more faster than what you can do without bookmark.

There may be some portion of code where we need to move very frequently; this could be in a same file or in other files. Generally we scroll through the page and move to that section or move back to the other file just to find the code.  But using Bookmark feature its very fast and easy to navigate.

You can use the Navigation Forward (Ctrl+Shift+ – ) and Navigation Backward (Ctrl + – )for faster navigation, but it works in sequential ways. You can’t jump back to a specific location.

Remember, the Bookmark is a very common feature of Visual Studio and it’s there since beginning. But I often observed many developers are not using it and just spending a lot of time in code navigation. I posted similar on my blog Using Bookmark in Visual Studio a long years back.

So, How it works? Very Simple ! Place the cursor on the line where you want to put bookmark and press  Ctrl+B + T or select the “Toggle a bookmark in current line” form the Bookmark Toolbar.

image

Place the bookmark wherever you want within your code files and then you can move among the book marks using Ctrl B + P, and Ctrl + B +N . This will make your navigation faster with in the file or even across different files within your solution.

Related Tip : Keep Track of your active files inside Solution Explorer – A Quick Visual Studio Tip

Leverage the features of Bookmarks Windows (View –> Other Window –> Bookmark windows) where you see list of  all  bookmarked code and navigate to them by just clicking them.

image

You can also remove , disabled them as you want.

To make it more readable and identify better, you can rename them from the Context menu.

image

 

Related Tip : How to keep track of Miscellaneous files efficiently in Visual Studio

Bookmarked Renamed :

image

This is a really great feature and would definitely improve your development productivity. If you are already using it, well and good ! if not, please start using it.

Hope this helps.

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

6 Comments to “Speedup your code navigation by Bookmarking your code in Visual Studio”

  1. Jimmy Gee

    Great! I was missing this feature to organize important places in my code set! Didn’t know that it was right infront of my nose all the time. Thanks!

Comments are closed.