#54 How to set a bookmark and navigate among themv

Trick number #30 also talked about Bookmarks, but this time I go into a little more detail as to why your keyboard bindings might be different than what you’re seeing in the video. The short version is that you probably chose Visual Basic or Visual C# when you installed Visual Studio and each of these has a different set of keyboard binding. The video shows you how to figure out your bindings, and spends a little more time on the bookmarking system built into Visual Studio.

 

[CTRL]+[K], [CTRL]+[K] to toggle a bookmark.
This command is bound to Edit.ToggleBookmark, if your keybindings are different

[CTRL]+[K], [CTRL]+[N] (Edit.NextBookmark) to navigate to the next bookmark

[CTRL]+[K], [CTRL]+[P] (Edit.PreviousBookmark) to navigate to the previous bookmark

[CTRL+[K], [CTRL]+[L] (Edit.ClearBookmarks)

All of these commands can be found at Edit | Bookmarks

And also found on the Text Editor Toolbar.  Note that on the Text Editor Toolbar, as mouse-over below, the Previous Bookmark in Document and Next Bookmark in Document don’t have keyboard shortcuts bound to them, but they are listed on the text editor toolbar.

This work is licensed under a Creative Commons license.

#53 How to enable Emacs and Brief editor emulations?

In VS 2005, we introduced Emacs and Brief emulations into the editor.  Go to Tools – Options – Environment – Keyboard, and then drop down the Apply the following additional keyboard mapping scheme:  Choose either Brief or Emacs.

#52 How to enable URL Click Navigation in the VS Editor

This is enabled by default for most editors, but just in case you’re not able to click on a URL, here’s what you do.  Go to Tools – Options – Text Editor – All Languages – General, and click on Enable single-click URL navigation.

#51 How to cycle through the clipboard ring to paste different items?

You can cycle through the past 20 items you’ve either cut or copied onto the clipboard via Ctrl+Shift+V.  Pretty cool, huh? As an added bonus for users of Visual Studio 2005, on the View menu, there is the option to view your Clipboard ring, which shows up as a list in your Toolbox. That visual has been removed for 2008, and as far as I can tell, hasn’t returned for Studio 2010.

#50 How not to accidentally copy a blank line in Visual Studio

We all use CTRL+C and CTRL+V everyday, 1000 times. It’s one of the first things you have to learn as a programmer to keep you hands on the keyboard. It’s easy to sometimes press CTRL+C again, when in fact it’s time to Paste, so you really meant to press CTRL+V. Visual Studio will allow you to copy a blank line. So it what you’re trying to paste, is onto a new blank line, and you accidentally press CTRL+C, you’ll copy the blank line, then your CTRL+V is lost. (Oh but tip #51 Shows you the clipboard ring). Anyway – this tip tells Studio to not copy blank lines.