简体   繁体   中英

Developing for ASP.Net MVC, Visual Studio tab names are meaningless

For all Visual Studio ASP.Net MVC developers - I'm sure you've faced this problem before:

在此处输入图片说明

In each one of my controllers, there is usually an Index, Create, Edit and Detail views. All of the default view files generated by ASP.Net's scaffolding are all given the same name, for example: index.cshtml . Granted, they're in different folders.

So it's really easy to get lost in Visual Studio when you have four or five tabs open, all with the same name! Is there a way/plugin to get visual studio show me something more meaningful, such as the controller name/view folder? Or do you developers just rename all of your files once they're generated? I already have resharper so bonus points if it's possible with that.

仅供参考,如果您将鼠标悬停在选项卡上,它会告诉您它位于哪个视图/文件夹中。这是区分不同选项卡的一种方法。

我将此插件https://visualstudiogallery.msdn.microsoft.com/2e8ebfe4-023f-4c4d-9b7a-d05bbc5cb239与VS2013和VS Community 2015一起使用。

What I usually do so far is Ctrl + N with resharper:

在此处输入图片说明

The Productivity Power Tools extension has a custom document well that lets you color code the tabs. It is usually used to color code them by the project they are in, but it also allows you to use custom regex. You could disable the project based color coding and add custom regexes to color any document tab with "Edit" in the path Blue, and documents with "Create" Green, etc... You will need to turn on the option for "Use full document path for regular expression matching" under the "advanced" tab of the power tool options.

在此处输入图片说明

The VS add-in Tabs Studio works for me.

After installing open the Tab Studio add-in manager and select the Disambiguator add-in, ie: 在此处输入图片说明

Will then give you tabs like this:

在此处输入图片说明

Note: it costs $49 after the 30 day trial...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM