Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2008: make Ctrl + K, Ctrl + N (next bookmark) stay within the same file

In Visual Studio 2003 you could jump to the next bookmark with Ctrl + K, Ctrl + N; it stayed within the same file and wrapped around to the top of the file when there were no furter bookmarks in the file. Now in VS 2008 this seems to have changed, and Ctrl + K, Ctrl + N jumps to other files with bookmarks. How can I change this back to the old behavior?

like image 299
Roel Avatar asked Oct 02 '08 12:10

Roel


People also ask

How do I customize shortcuts in Visual studio?

On the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard. Optional: Filter the list of commands by entering all or part of the name of the command, without spaces, in the Show commands containing box. In the list, choose the command to which you want to assign a keyboard shortcut.

How do I bookmark a line of code in Visual studio?

Bookmarks extension: Ctrl+K+S (or Ctrl+Shift+P to open Keyboard Shortcuts) and search for Bookmarks to assign/change hotkeys. Also nice: it adds a new tab to the left side so you can view your bookmarks. They persist between sessions.

How do I add a bookmark in Visual studio?

Create and Manage Bookmarks To bookmark a line of code, place the cursor on the the line of code you intend to bookmark and use the Toggle Bookmark icon in the bookmark window. Another quick way to bookmark code is to use the keyboard shortcut Ctrl+K, Ctrl+K.


1 Answers

Actually, you have two other commands that by default are not assigned a shortcut:

  • Previous Bookmark In Document
  • Next Bookmark In Document

You'll see them if you go to the Edit->Bookmarks menu. You can bind them to a shortcut if you go to Options->Preferences->Environment->Keyboard and look them up as Edit.PreviousBookmarkInDocument and Edit.NextBookmarkInDocument.

Cheers!

like image 83
dguaraglia Avatar answered Sep 20 '22 16:09

dguaraglia