Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do Visual Studio 2005+ bookmark keyboard Shortcuts go to bookmarks in other documents?

Prior to Visual Studio 2005, the bookmark feature worked perfectly. Then starting with VS 2005, I noticed that requesting the "next" or "previous" bookmark stopped working correctly. Sure it will take you to a different bookmark, but it takes you to a bookmark location that is the least relevant or most obscure based on your current location. Even when I'm sitting on a book mark, and I can "see" the next (and previous) book mark, Visual Studio will still take me to some random far-off bookmark (in an entirely seperate project and file if it can help it).

In fact, the only way I can truly get to the "next" bookmark in my document, is to ensure there are not more than two bookmarks in the entire solution (and both must be located in the current document).

I'm trying to understand how this went so wrong, and if there is some simple configuration setting I can make that will correct the problem. I'm now using Visual Studio 2008 (which has the same problem). I've not tried this in 2010 yet.

Update: I've discovered that the order which bookmarks are traversed, are the order they are created in. There is a "bookmarks view" where that order can be manually re-arranged. However, in the past the order was always ascending line-number, which was much more useful. So now the question is, how do I modify the behavior?

like image 667
Brent Arias Avatar asked Jul 24 '10 00:07

Brent Arias


1 Answers

I think starting with 2005 the CTRL-K+CTRL-N and CTRL-K+CTRL-P shortcuts were changed from "move the caret to the next bookmark in the current document" to "move the caret to the next bookmark".

You can get the old behaviour back by editing the keyboard shortcuts to assign CTRL-K+CTRL-N and CTRL-K+CTRL-P like so:

enter image description here

enter image description here

like image 124
Matthew Lock Avatar answered Oct 23 '22 05:10

Matthew Lock