Thursday, November 12, 2015

VSFileNav: Recommended Visual Studio extension for jump-to-filename navigation

Having used Visual Studio 2013 and 2015 as my primary coding IDE for the past 18 months or so, I haven’t been terribly happy with Visual Studio’s out-of-the-box support for the task of using the keyboard to open a file with a particular name (in a large solution).

As detailed in this StackOverflow question, there are a few options, none of which work well for me:

Ctrl+[comma], filename, Enter –This is frequently very sluggish on my (modern) PC, with a delay of 5-10 seconds between the search field appearing, and Visual Studio recovering from being unresponsive and actually allowing typing in the field. Worse, occasionally after typing the Ctrl+[comma] hotkey, the search term that I started typing while the application was still unresponsive (but after the search field appeared), the text I entered gets inserted into the active source code document instead of in the search field!

Ctrl+[semicolon], filename, Enter, Enter – Aside from the drawback of having to hit Enter twice, this leaves the Solution Explorer window in a state of showing only the matches for the entered search term.  To clear the search, either using the mouse or hitting Ctrl+[semicolon], Esc, Esc is needed – obviously not ideal.

Ctrl+Alt+a, of, filename – The Ctrl+Alt+a keyboard shortcut to open the Command Window doesn’t work in my Visual Studio, for whatever reason, even though that shortcut is listed in the Edit menu.  Additionally, the autocomplete in the Command Window frequently messes up my search term. For example, if I’m trying to search for a file named “property.aspx” in my solution, but my solution also has a file named “property-format.aspx”, as soon as I type “property.”, the autocomplete for some reason assumes I want “property-format” and replaces my typed search term with that.  So, no good.

Since none of the out-of-the-box solutions work for me, I resorted to trying a Visual Studio extension that provides this functionality, VSFileNav.

VSFileNav2

VSFileNav is a Visual Studio extension that binds a customizable hotkey – I’m using Ctrl+[tilde] – to open a custom File Navigation dialog allowing quick search and open of all files in the current solution.  Some reasons that VSFileNav is awesome enough that I felt compelled to blog about it:

  • It’s lightning fast. Opening the File Navigation dialog, typing in the dialog to filter filenames in the solution, seeing search results update in real-time as the search term is being typed, and jumping to the selected file upon a press of the Enter key all happen effectively instantly.
  • It supports Pascal-case filename search.  Typing “MCC” into the search field matches “MyCustomClass.cs” as a search result, for example.
  • It just works. I didn’t have to fight with any bugs or configuration settings (beyond setting my preferred hotkey) to make the extension work; I just installed, and it worked great immediately.

VSFileNav, or something like it, really ought to be out-of-the-box functionality in Visual Studio.  But since it isn’t, if you’re a developer using Visual Studio, do yourself a favor and start using VSFileNav.

4 comments:

  1. Thanks for the review, I'm glad you're finding it useful. I originally developed VSFileNav back for Visual Studio 2010 when really the built in file searching was almost non-existent and the plugin I used suddenly started running far too slowly. I actually expected interest in it to fizzle out as Visual Studio got better, but I've been consistently asked to upgrade the project so keep on doing so.

    ReplyDelete
  2. Note to self: The VSFileNav item in the Keyboard Options dialog is "Edit.QuickFindFile".

    ReplyDelete
  3. I've just updated this extension (better multi-monitor support). It also now features in the Visual Studio built in Gallery search (but has a new URL) https://visualstudiogallery.msdn.microsoft.com/57278574-d596-4f3c-8d1a-fc5e571c9a31

    ReplyDelete

Non-spammers: Thanks for visiting! Please go ahead and leave a comment; I read them all!

Attention SPAMMERS: I review all comments before they get posted, and I REPORT 100% of spam comments to Google as spam! Why not avoid getting your account banned as quickly -- and save us both a little time -- by skipping this comment form and moving on to the next one on your list? Thanks, and I hope you have a great day!