.NET Tips and Tricks

Blog archive

Add a Shortcut to Frequently Visited Code

I had an application with one section I had to work on every couple of months over several years (the client kept changing its collective minds about how it wanted part of the UI -- a search page -- to work). Eventually, I created a shortcut to the section of code I kept having to change so that I could get there quickly. Adding a shortcut is just one step: Click on a line and type Ctrl+K+H.

Returning to that line requires two steps: First, in any version of Visual Studio, you select Task List from the View menu. After that, though, getting to the list of shortcuts depends on which version of Visual Studio you're using. On some versions, you have a dropdown list underneath the title bar in the Task List -- selecting Shortcuts from that dropdown list lets you see your shortcuts.

If, on the other hand, there is no dropdown list, shortcuts appear mixed in with other Task List items. Either way, once you have the list displayed, you navigate to your selected area by double-clicking on its shortcut in the Task List.

As with any other Task List item, you can't delete a shortcut from within the Task List. If you don't want to keep that shortcut around anymore then you'll need to go to that line of code, click somewhere in it and use Ctrl+K+H again to remove the shortcut.

Posted by Peter Vogel on 10/07/2016 at 1:27 PM


Featured

  • No More .NET Framework APIs Will Be Ported to .NET Core, Microsoft Says

    The old, proprietary, Windows-only .NET Framework has given all it can give to the new cross-platform, open-source platform of the future, .NET Core.

  • Bright Tunnel

    Visual Studio 16.4 Preview 2 Boosted by Extension Tech

    Microsoft today shipped Visual Studio 2019 v16.4 Preview 2, boosted with new features that come from formerly separate extensions.

  • Nebula

    .NET Core 3.1 Preview 1 Focuses on Blazor, Desktop

    The first preview of .NET Core 3.1 focuses on two of the big features highlighting the Sept. 23 release of .NET Core 3.0: Blazor (for C# Web development instead of JavaScript) and desktop development (Windows Forms and Windows Presentation Foundation).

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events