External editor in Visual Studio 2008 - visual-studio

Is there any way to set up external editor integration for VS2008?
By this I mean when I double-click on a .CPP file in the Solution Explorer, it should open in the external editor, not the internal VS one.
To keep it simple let's say I want it to open the file in Notepad++ (or how about Notepad to make it even simpler).

Right click on the type of file you want in the Solution Explorer,
Then choose Open With...
Pick your program, and choose "Set as Default"

Right click on any file and choose open with..
Then click on add to browse to the program of you choice for this file type and having added it to the list, select "set as default"
From now on when you double click on this file type it will open in the editor of your choice.

(In VS2008)
You can goto: Tools -> Options -> Text Editor -> File Extension. Put a file extension in and choose a program to launch with it

Related

Is there a way to set a keyboard shortcut to open containing folder of a selected file in Solution Explorer in Visual Studio?

When I click on a C++ project in Visual Studio, I get this menu:
And so I can quickly press Alt+F,F(Command ProjectandSolutionContextMenus.Project.OpenFolderinFileExplorer) to open the folder of the project.
I also found that I can open containing folder if I open the file in the Text Editor in Visual Studio:
I bound it to Alt+F,F as well. I set it to only be active in Text Editor, it's the File.OpenContainingFolder command.
But when I click on files inside the project in the Solution Explorer, there is no context menu:
I tried to make the File.OpenContainingFolder command global, but it still doesn't work in the Solution Explorer when I just click on a file once. If I double click it and open it in the text editor, it works.
And I can't find a command in the Keyboard section in options of Visual Studio to open containing folder of a file selected in the Solution Explorer.
Maybe someone knows how to do it?
You can create an external tool menu item, and then bind a shortcut to that item.
Go to Tools > External Tools.
Click Add.
In Title edit box type Show in Explorer.
In Command edit box type explorer.exe.
In Arguments edit box type /select, $(ItemPath). There is a space between a comma and a dollar sign.
Click OK.
Make note at the position of the new command in the list. It could be first, it could be fifth, or something else. Let's assume it's the fifth one.
Assign a shortcut to the command Tools.ExternalCommand5. Restrict the shortcut to Solution Explorer.
That's it.

How can I make Visual Studio open .linq files in LinqPad.exe rather than it's own editor

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.

Shortcut in Visual Studio to open solution in Windows file explorer?

Is there a keyboard shortcut in Visual Studio (currently using 2013) to open the solution (or a project) in the Windows file explorer?
Currently, I normally have to open up the Solution Explorer, right-click on my solution or a project and scroll down to 'Open Folder in File Explorer', but this becomes a time consuming task as I have to do it often (TortoiseGit not integrated with my IDE).
An improvement over #Walt_Ritscher's answer I found was to assign a keyboard shortcut to the File.OpenContainingFolder.
Instead of having to first select a project or solution from the solution project I can simply press a desired keyboard shortcut while any file is in focus (without having to open the Solution Explorer) and it will open the file location in Windows Explorer. This saves time if the focus in my solution explorer is on a file deep in the structure of my solution explorer since I don't have to scroll all the way back up to select a project/solution before hitting the keyboard shortcut.
Yes, you can add your own keyboard shortcut to open the folder.
Open the Tools/Options/Keyboard dialog. In the Show Commands Containing textbox, type OpenFolderIn and you will see the OpenFolderInFileExplorer command. Select the command, then assign a shortcut key. Move your cursor to the Press shortcut keys textbox.then press your desired key combination. In my example I chose Ctrl+Shift+'. Be sure and click the Assign button to memorize the shortcut key
Press OK and you're done.
For visual studio vs2017:
Ctrl+Shift+Alt+O

Visual Studio Team Explorer can't properly open a PDF file - Solution Explorer not available for "open with" setting

We have PDF (and other) files attached to TFS Work Items and in Source Control under TFS. They are not opened correctly (they show up as ASCII, basically) in Visual Studio.
The problem seems to be that until you use the 'Open With..' dialog from the Solution Explorer, VS doesn't properly associate a program with extensions like '.pdf'.
If our users had a full installation of Visual Studio, that would be an ok work-around. However, many of them only have Visual Studio 2013 with the Team Explorer component - no Solution Explorer at all.
I'm guessing that there must be some workaround for this case. Perhaps setting the proper registry value? Since VS properly remembers the association if you can tell it (through the Solution Explorer), it must be stored somewhere.
Ideas? Suggestions?
If you've got a PDF file in a project you can right-click in the solution explorer and choose "Open with..". Now you can choose which editor you want to use. If Acrobat isn't already listed you can add it and after that click the button "Set as default".
After that, your PDF's will always open with Acrobat Reader regardless if you open it from source control browser or elsewhere in the Visual Studio. But you need to configure that for all your Studios.
Reference: Answer in MSDN "Source Control Explorer Doesn't View PDF Files"
"Open with" is not available in context menu. But I found solution - well better said workaround:
You have to create external command to open this pdf file in you pdf viewer.
Go to Tools/External tools.
In command section, enter path to your PDF viewer (exe file)
In Arguments, choose "Item path". Save it under preferred name
Put this new command you created in some of existing toolbars or create new one for it. This is also little complicated, so here is how:
Hit the small arrow next to the existing toolbar, choose customize
In the new window, choose "Add command"
In the new window, your new command is hidden under the category "Tools" as command "External command 1". Add it and confirm.
Now here comes the nasty trick. This command will not work in the browser window with PDF file selected, the argument is empty :(
So you have to OPEN the pdf file into that ASCII window and THEN hit the new command. Now the file will open in you selected pdf viewer.
Hope this will help someone

Visual Studio Sourcesafe 6.0 *.js filetype change default editor

I'm using Microsoft Visual Studio Sourcesafe 6.0.
When edit *.js(JavaScript) File Type, the default text editor is notepad.exe, but I want to use another text editor.
How to change *.js File Type default text editor?
By default, you can use notepad to view JavaScript source code. To change it, follow these steps:
Quit Internet Explorer (if it is running).
Double-click My Computer.
On the View menu, click Options (or Folder Options).
Click the File Types tab. In the Registered File Types box, find JavaScript, click it, and then click Edit. Then select your editor.
Note: If it is not works, you may need to type a space and %1 at the end of the command. For example, if you want to use Notepad to be your default HTML editor, type the following command: c:\windows\notepad.exe "%1"
OK, click Close, and then click Close again.
Reference: http://support.microsoft.com/kb/163606/en-us
Does it really work? I don't know. But try it, please.
this can be easily done via Tools->Options menu in Visual SourceSafe Explorer. How to: Change the Default Editor

Resources