LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
AristosQueue (NI)

Shortcut to open file based on project tree and current VIs in memory

Status: New

Drawing on an idea from Visual Studio... If I have a hierarchy of VIs in memory or a project open, it would be useful for navigation to have a shortcut key that brings up a quick dialog where I can type in a full or partial file name and hit Enter and that named VI will be brought to the foreground. This way you don't have to care about path on disk or navigating to find the VI in the VI Hiearchy or project tree. The dialog would just know about all the VIs currently listed in your project or currently in memory and open the path that matches the filename. 

 

Unlike MSVS, LV has the problem of VIs with identical file names in different libraries. Tab name completion (type a bit of the library name, hit tab to finish that name, then type part of the desired file name) could solve this. Alternatively, if you type in a filename shared by multiple VIs, you get a second dialog to choose  which one you want (like the selection dialog that appears when you double click on a dynamic dispatch subVI node). 

 

LV also has an issue with the same VI being loaded in multiple application instances. I suggest that the shortcut key always take you to the VI in the current app instance and fail if the VI is not in the current app instance (and by current I mean whatever app instance the VI that currently has focus is in).  It should never open a VI in another app instance as that can lead to confusion about what is being edited... to change current app instances, you would use the project tree to deliberately open the VI, just as you do today. 

 

My first instinct for the shortcut would be ctrl+shift+o because of its relationship to Open, but given that this might be frequently used, having a shortcut that doesn't involve two modifiers would probably be preferred by most people. MSVS uses ctrl+/ for this accelerator.

3 Comments
AristosQueue (NI)
NI Employee (retired)

This idea was actually started inside NI by another developer, and he has a good note that I think should be repeated here:

"So for those that plan on commenting, keep in mind that I am talking about code navigation. This is when you generally know what code you want to look at, and you know where it is located. Navigation is not the same as search."

tst
Knight of NI Knight of NI
Knight of NI

I think that this should be rolled into QD, which is already a dialog suited for such things, which also indexes the VIs in the project.

 

When I wrote my own version of QD, I added a feature where Shift+Enter would open the palette of the match so that you can drop several VIs one after the other. This can work in a similar way where Ctrl+Enter would open the matching VI instead of dropping it.

 

In fact, with the QD plugins feature available in 2009, we could probably do this today with a single VI. All you need to do is call the FP.Open and BD.Open methods on the matching VI.


___________________
Try to take over the world!
silmaril
Member

Sounds like a really good idea. I'd prefer it to be in the project tree, not in the QD menu.

 

Before you decide, which shortcut to use, please have a look at some international (non-English) keyboard layouts.

Ctrl+/ is a very good example here: On a German keyboard, you get the slash by pressing shift+7. So ctrl+/ would be shift+ctrl+7.

Shift+ctrl+o would be a lot easier to remember (and just as difficult to type).