Visual Studio - 管理许多打开文件的工作的技巧 [英] Visual Studio - tips for managing work on many open files

查看:8
本文介绍了Visual Studio - 管理许多打开文件的工作的技巧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您打开大量标签时,您对 VS 让您寻找几分钟前使用的标签有何感想?不断拖动标签以使您使用的标签保持在一起怎么样?

How do you feel about VS making you hunt for a tab that you used just minutes ago when you have a bazillion open tabs? What about constantly dragging tabs around to keep the ones you use close together?

哦,所以你也认为 AARGH?然后继续阅读.

Oh, so you think AARGH, too? Then read on.

我正在开发一个包含数十个项目和数百个文件的软件.填满标签栏真的很容易 - 就像在调试时一样,它可以打开很多文件,其中大部分只是样板文件,或者对于手头的任务并不是很有趣.
这使得 相关 的少数文件掉出"标签栏,或者通过浏览可见标签很难找到.

I work on a piece of software with dozens of projects and hundreds of files. It's really easy to get the tab bar to fill up - like when debugging, which can open a lot of files, most of which are just boilerplate, or not really interesting for the task at hand.
This makes the few files that are relevant to 'fall off' the tab bar, or a pain to find by skimming the visible tabs.

有一些解决方案,其中一些比其他解决方案更广为人知.这是我的前 3 名:

There are some solutions, some more widely known than others. Here's my top 3:

III.如果您能准确记住文件名(或至少是第一个字母),则此方法有效:使用查找框":

III. This works if you can exactly remember the file name (or at least the first letters): use the 'find box':

type: Ctrl-D >of yourFileName

当您键入文件名时,您会自动完成解决方案中的文件名.更多详情这里.

As you type the file name, you get autocomplete on the file names in the solution. More details here.

II. 最明显的一个:使用按字母顺序排列的标签栏右侧的活动文件"下拉菜单.
鲜为人知的事实:使用 Ctrl-Alt-DownArrow 打开该下拉菜单,然后开始输入文件名.您将获得可视化可用选项的额外好处.[无耻地从 这里]

II. The most obvious one: using the 'active files' drop-down on the right of the tab bar which is alphabetically ordered.
Lesser known fact: use Ctrl-Alt-DownArrow to open that drop-down, then start typing the file name. You get the added benefit of visualizing the available choices. [info shamelessly stolen from here]

I. <drum roll/> 这是我个人最喜欢的一个,它基于 VS 2005/2008 的一个未记录的特性.激活后,它会做一件简单的事情:单击选项卡会将其移动到窗口的最左侧.这个基本操作通常可以让我在前 3 到 5 个标签中找到我正在寻找的标签.它是这样的:

I. <drum roll/> This one is my personal favourite, and it's based on an undocumented feature of VS 2005/2008. When activated, it does one simple thing: clicking a tab moves it to the left-most side of the window. This basic action usually lets me find the tab I'm looking for in the first 3 to 5 tabs. It goes like this:

删除了无效的 ImageShack 链接 - 示例动画

要启用此功能,您必须亲自操作 Windows 注册表.
强制编辑注册表自行承担风险警告:
编辑注册表可能会使您的网卡将数据包丢弃在地板上.您已被警告.

In order to enable this functionality, you have to get your hands dirty with the Windows registry.
Compulsory edit-registry-at-your-own-risk warning:
Editing the registry may make your network card drop packets on the floor. You have been warned.

将此键添加到 VS 2005 的注册表中:

Add this key to the registry for VS 2005:

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftVisualStudio8.0]
"UseMRUDocOrdering"=dword:00000001

或者这个对于 VS 2008:

or this for VS 2008:

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftVisualStudio9.0]
"UseMRUDocOrdering"=dword:00000001

您甚至不必重新启动 VS 即可看到它的工作![抄袭自这里]
现在继续,试一试!

You don't even have to restart VS to see it work! [plagiarized from here]
Now go on, give it a try!

更新:这个技巧在 VS2010 Pro 中不再有效 :(

Update: This trick no longer works in VS2010 Pro :(

我的部分到此结束.现在轮到你分享你是如何处理标签搜索的了!

This wraps up my part. Now it's your turn to share how you deal with tab hunting!

推荐答案

ReSharper 及其最近的文件功能对我来说效果更好.

ReSharper and its Recent Files feature works a lot better for me.

这篇关于Visual Studio - 管理许多打开文件的工作的技巧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆