This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Is there a shortcut to move between header and source file in VC++?
Hi.
Quick and easy question I haven't been able to discover myself:
Which is the keyboard shortcut for switching to the corresponding header file of a .cpp file in MS VS2010.
Thanks.
I don't think this functionality is available short of right-clicking in the CPP file and selecting "Go To Header" and from the header file selecting "Go To Definition" to switch back and forth.
Check out these similar questions for macros and addins to achieve a keyboard shortcut:
Visual Studio 2008 macro to switch between header and source files?
Is there a shortcut to move between header and source file in VC++?
You can also check out the Visual Studio 2010 Keybinding Posters.
Related
This question already has answers here:
How to Edit multiple lines in Visual studio 2017 at once
(9 answers)
Closed 1 year ago.
I'm trying to set some shortcuts in VS IDE but I used to write code in jetBrains IDE's (e.g. CLion, IJ, PC) which allow to write in several places simultaneously.
is it possible to do the same in VS?
thanks to #phuzi comment. How to Edit multiple lines in Visual studio 2017 at once
to set more then one keyboard cursor in VS default setting just press Shift+Alt and press several places with left mouse click or just Alt and drag left mouse key to mark rectangle.
you can't edit nons following lines like in CLion for example.
I was working on Xcode for C++ development earlier and it's code editor had an option where when a header file was opened it would automatically open the .cpp on the assistant editor.
I am talking about this feature:
"How do I switch between the header and implementation file in Xcode 4?"
Now I have moved on to Visual Studio 2107. Though it is pretty intuitive in itself, I still miss this feature. Is there any feature similar to "open counterpart" in Visual Studio?
You can use my Tabs Studio extension with AutoOpener add-in enabled to automatically open corresponding .h or .cpp file.
I have a VS 2017 solution that contains some .LINQ scripts. When I double click those files in the solution explorer in VS I'd love to have them open in LinqPad (the default system editor) rather than a VS text editor.
Is there a way to configure VS to do this? I tried Tools->Options->Text Editor->File Extensions but none of the options there seemed like it would open something outside VS.
I realise this is an old question and I don't have VS2017 but just in case it is applicable, VS2019 provides this functionality. If you right-click on the .linq file in Solution Explorer and choose "Open With..." you will be presented with a dialog similar to below:
LinqPad may not be in the list. If it's not then click "Add..." and navigate to where it is installed and choose the LINQPad.exe executable.
Make sure to click "Set as Default" and then click OK.
Opening the file from Solution Explorer should now open it in LinqPad rather than Visual Studio.
This question already has answers here:
Compare files on double click in Pending Changes view
(9 answers)
Closed 5 years ago.
I'm using Visual Studio 2013 with TFS for source control. When I open Team Explorer > Pending Changes and double-click on a changed file, the file opens in the editor. The only way to see my pending changes is to right-click and choose Compare with Workspace Version. This gets time-consuming for a long list of files.
Can I change the default double-click action to Compare with Workspace Version? (That seems to be the default when using Git, but not for TFS.)
Checked and that works:
The simple way is highlighting the file thenshift + double-click instead.
To make the compare behavior as default, just copy/past below string in a .reg file and double click it to add the registry key. (Change the version accordingly based on your TFS version)
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\TeamFoundation\SourceControl\Behavior]
"DoubleClickOnChange"=dword:00000001
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Link to all Visual Studio $ variables
Visual Studio has a lot of environment variables like $(TargetFileName) but I can't seem to find a list of all of them on MSDN or via Google.
Does such a list exist?
NOTE: See the top answer for the duplicate question (link above) for a link to a list on MSDN.
In most places where you can use those, there's a "Macros" button or similar, which shows all available macros and the current value of them. For example, go to the PostBuild event editor to find the list.
Edit: I just checked. There's a list in MSDN.
You can get the list of available environment variables directly within Visual Studio 2010 with the following steps:
in Visual Studio env, right click on your project
properties
configuration properties / C++ / General
for ex. go into Additional Include directories
'dropdown' Edit
Macros
There you will find a complete list of available macros with their values set according to your settings. This can be very useful when debugging or selecting the right macro for your project settings.