In Visual Studio 2019 - How do I add a 'New Textfile Item' shortcut into the solution explorer context menu? - visual-studio

I am wanting to add a new context menu item into visual studio's solution explorer context menu. As seen in the image below;
I want this context menu to create a new textfile. (Basically the same as Add -> New Item but configured as a new textfile)....
I see that you can add items to the context menu as seen in this post here: How to customize Visual Studio Solution Explorer right click menu options?
But I don't see a clear way to make it add a new textfile, only more basic options.
Alternatively, is there a shortcut I can use? I have tried the File-> New File -> TextFile option. But that will not add it to the solution's folder.

Related

How can I change the default file explorer context menu item for Visual Studio

In Visual Studio when I use the context menu to open a folder it currently opens windows explorer. I would like to modify this context menu item or add a new one so that it calls Explorer++ instead.
Explorer++ accepts commandline arugments to open new tabs like such:
"C:\Program Files\Explorer++\Explorer++.exe" "C:\git"
So in Visual Studio I need to modify or preferably add a new item but don't see how to extract or add the currently selected folder as a varaible as the "Modify Selection" button doesn't actually open a command up.

How to add the currently edited file to project

In Visual Studio 2013, often I am editing a file that is not in the current project, and would like to add this file to the project. Is there an easy way to do that? The only way I've found is via right click on the project, Add/Existing Item (Shift+Alt+A), and then browse to the file I want to add in the dialog. Is there a shortcut I am missing?
This works in Visual Studio 2010:
Right-click on the document tab, select "Copy Full Path".
Project - Add Existing Item - Ctrl+V - Add.

Visual Studio 2010: Name of document tab context menu

Does anyone know the name of the context menu that you get when right clicking a document tab in Visual Studio 2010?
I want to add the "Close All Documents" command to it, but I cannot figure out which context menu it is in the customize dialog.
You can find that menu at Other Context Menus | Easy MDI Document Window.

Adding context menu for VS 2010 Add-In on loading

I'm creating an Add-In for Visual Studio 2010.
I want to add the context menu item to the tab during Add-In loading
(in OnConnect method of the Add-In):
I do know how to add the menus using CommandBars.
I already added commands into "Tools" and "Solution Explorer" menus.
I just cannot find the CommandBar responsible for the menu, I need.
Can anybody help me?
Solution found.
You can enable logging of chosen menus.
Details:
http://blogs.msdn.com/b/dr._ex/archive/2007/04/17/using-enablevsiplogging-to-identify-menus-and-commands-with-vs-2005-sp1.aspx
http://blogs.msdn.com/b/dr._ex/archive/2007/04/17/using-ivsproffercommands-to-retrieve-a-visual-studio-commandbar.aspx

Blame source file from within visual studio

I'm using AnkSVN within Visual Studio 2010, and it covers ~95% of my SVN needs. The biggest missing feature is that I can't find a way to blame a file from directly within VS. The workaround I currently use is to right click on the file within the tablist, and select Open Containing Folder, and then right clicking on the file in Explorer to call Blame.
It's called Annotate in AnhkSVN.
Subversion -> Annotate in the context menu.
I didn't like AnkhSVN's Annotate feature. So I used the following:How to integrate TortoiseSVN into Visual Studio.
Content from above url:
If you're using Visual Studio, you can integrate TortoiseSVN commands to various context menus.
The first step is to add the TortoiseSVN commands as external tools, under the menu TOOLS->External Tools....
Add the name of the command, the path to TortoiseProc.exe and then the parameters for the command.
Use the VS variables wherever needed. Since I add my commands to the context menu of the open file tab, here's the parameters I used:
/command:blame /path:"$(ItemPath)" /line:$(CurLine)
/command:diff /path:"$(ItemPath)"
/command:log /path:"$(ItemPath)"
Notice the /line: parameter: this will make TortoiseBlame automatically scroll to the same line the cursor is located in the opened file in Visual Studio.
Now to add those new commands to the file tab context menu, go to TOOLS->Customize..., select the Commands tab, click the radio button Context menu and then select Other Context Menus | Easy MDI Document Window.
Now you have to select the commands. Problem is that the custom commands are not shown with their title but only as External Command X with X being the number of the external command.
In my case, the commands were number 9-11, you might have to do some trial-and-error here. Just add the commands you think are the ones you added and then check if the right ones show up in the context menu.
NOTE: In Visual Studio 2010 to add a command to the right-click menu of a document’s tab, first you’ll need to right-click on a Visual Studio document tab to work around a Visual Studio bug. (Otherwise the Easy MDI Document Window context menu doesn’t show up in the Customize dialog.) Source

Resources