Sign in to follow this  
BaneTrapper

Open a file by tiping in its name in Visual studio 2010 c++

Recommended Posts

BaneTrapper    1531
Hello.
What i am trying to do is find a way to navigate around files in Visual studio 2010 c++,
I have about 20 files(.cpp, .h) and am expecting about 50-70 more, and navigating around is a real pain.

In codeblocks there was a way for this "Alt+G" .

Any tips and suggestions how to navigate around files?

Share this post


Link to post
Share on other sites
brx    720
You can use the search box for this: just type in ">of myFile" (without quotes) and it opens the file.

As an alternative there are add-ons that do this. Visual Assist X, for example, has that feature. Edited by brx

Share this post


Link to post
Share on other sites
NightCreature83    5002
You can install Vissual Assist X into Visual Studio as a plugin in which has this bound to ALT+SHIFT+O by default. There is nothing like this in stock Visual Studio and you are going to have to rely on a plugin to do this for you. Visual Studio Express versions don't support plugins so there is no way to get it in those other then to bring up the open file dialog, but that's not really what you are after I think.

Share this post


Link to post
Share on other sites
DpakoH    1204
well i colleague of mine once told me that around 10 years ago they used to navigate through files in visual studio by using the shortcut for open file (Control + O) and start typing the name of the file. guess you could use that. :)

Share this post


Link to post
Share on other sites
Sandman    2210
In the command window (Ctrl + alt + A) type:

open [filename]

at the prompt.
You generally just need the name of the file, it should generally be able to find the full path automatically.

Share this post


Link to post
Share on other sites
Mike.Popoloski    3258
Uh, why hasn't anyone said anything about Ctrl+Comma yet (or Edit->Navigate To if your keybinds are different)? That lets you to navigate to files and/or symbols in your code by typing their names. Is it not available in the express editions or something? Edited by Mike.Popoloski

Share this post


Link to post
Share on other sites
Gavin Williams    985
This feature has been added to VS2012 just for the record.

Edit : Apologies, I assumed that it must be a new feature, if people are claiming they don't have it in 2010. Edited by Gavin Williams

Share this post


Link to post
Share on other sites
~Nem    324
I wrote a plug-in for this because I missed the Visual Assist functionality but didn't want to purchase it:
[url="http://nemesis.thewavelength.net/index.php?p=56"]http://nemesis.thewavelength.net/index.php?p=56[/url]

It also supports Alt-O to open the .cpp from a .h and vice versa.

Share this post


Link to post
Share on other sites
brx    720
Honestly, I don't quite get it. What's the problem with typing
[CODE]
>of
[/CODE]
in the search box? The search box is there by default (I might be mistaken, but even if it isn't, it's easy to get it), so it's only four keystrokes (including the space after the "of") to get this feature. Yes, it also works in the command window as Sandman suggested, but I think the search box is a lot faster.

[quote name='NightCreature83' timestamp='1355840576' post='5012051']
There is nothing like this in stock Visual Studio
[/quote]
This is plain wrong.

Share this post


Link to post
Share on other sites
BaneTrapper    1531
[quote name='Mike.Popoloski' timestamp='1355849723' post='5012107']
Uh, why hasn't anyone said anything about Ctrl+Comma yet (or Edit->Navigate To if your keybinds are different)? That lets you to navigate to files and/or symbols in your code by typing their names. Is it not available in the express editions or something?
[/quote]
Well that would do it, thought its a bit slow, but i will save allot of time this way, also that in my Visual studio express 2010.

[quote name='Gavin Williams' timestamp='1355852200' post='5012117']
This feature has been added to VS2012 just for the record.
[/quote]
As i just said above, i have ability to use this in Visual studio express 2010.

EDIT:
Please don't down vote'Gavin Williams' post for no reason...
He obviously meant no harm, just wanted to help.
[quote]Replay to "brx" post[/quote]
I did not find the search box and after i found "Edit -> Navigate to (hotkey ctrl+,)" i did not investigate any further tho it would be a viable option.

Thanks you everyone
Edited by BaneTrapper

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this