简体   繁体   English

Visual Studio插件,用于快速搜索解决方案中的文件

[英]Plug-in for Visual Studio for quick-searching files in solution

I want to write an Add-In for Visual Studio that provides instant search for the solution explorer. 我想为Visual Studio编写一个加载项,为解决方案资源管理器提供即时搜索。 So you press a key combination and while you are typing a list first containing all files of the solution explorer gets narrowed down. 因此,您按下一个组合键,当您键入一个列表时,首先包含解决方案资源管理器的所有文件。

But how can I get access to the solution explorer using C#? 但是如何使用C#访问解决方案资源管理器? Does anyone have some good resources? 有没有人有一些好的资源?


Edit: I edited the title, so that it more relates to the content, since all of you posted already made plug-ins. 编辑:我编辑了标题,因此它更多地与内容相关,因为所有人都发布了已经制作的插件。

Sonic File Finder it's free Sonic File Finder它是免费的

When you hit the shortcut you have a search box with autocomplete: alt text http://jens-schaller.de/files/images/SonicFileFinder/sonicFileFinderToolWindow.png 当您点击快捷方式时,您会看到一个带有自动完成功能的搜索框: alt text http://jens-schaller.de/files/images/SonicFileFinder/sonicFileFinderToolWindow.png

Visual Studio is already perfectly capable of doing that; Visual Studio已经完全有能力做到这一点; just drag the "Edit.GoToFindCombo" to the toolbar, if it's not already there. 只需将“Edit.GoToFindCombo”拖动到工具栏,如果它还没有。 (Press Ctrl+D if it is, to activate) and type ">of s" for all files starting with the letter 's'. (如果是,则按Ctrl + D,激活)并为以字母's'开头的所有文件键入“> of s”。

使用'open'命令的GoToFindCombo示例
(source: aaronlerch.com ) (来源: aaronlerch.com

The GoToFindCombo is more powerful than this though, you can set aliases ">alias $aliasHere $SomeCommand" for virtually every command in Visual Studio. GoToFindCombo比这更强大,你可以为Visual Studio中的几乎每个命令设置别名“> alias $ aliasHere $ SomeCommand”。 For example, to make an alias for find in files you type ">alias ff Edit.FindinFiles" 例如,要为文件中的查找创建别名,请键入“> alias ff Edit.FindinFiles”

Why re-invent the wheel? 为什么重新发明轮子? DevExpress + Microsoft tied up to offer CodeRush Express for free @ PDC2008 that does just that if I understand you correctly. DevExpress + Microsoft绑定提供免费的CodeRush Express @ PDC2008如果我理解正确的话就可以。

AFAIR I think the magic key combo for Jump to File is Ctrl+Alt+F and it does substring matches too. AFAIR我认为跳转到文件的魔术键组合是Ctrl + Alt + F,它也会进行子串匹配。 I tried it and it worked for me. 我试过了,它对我有用。 Pretty nifty. 很漂亮。 Here's the link to a recording in case I goofed up on the actual keystroke... some really nice tips in it. 这是录制内容的链接 ,以防我对实际按键进行蠢事......其中一些非常好的提示。

Update : Wrote a blog post for those who're short of time. 更新 :为那些时间不够的人写了一篇博客文章

DPack really beats all of them (and moreover it's FREE). DPack真的击败了所有人(而且它是免费的)。
Check out the Alt+U and Alt+M shortcuts (also I recommend others too). 查看Alt + U和Alt + M快捷方式(我也推荐其他人)。

Additionally I have found StudioTools to have very impressive GoTo feature if you want to jump to specific point (type member) in another file (really very fast). 另外,如果你想跳转到另一个文件中的特定点(类型成员)(非常快),我发现StudioTools具有令人印象深刻的GoTo功能。

NOTE: R# also has such feature but IMO it's weaker than DPack's version. 注意:R#也有这样的功能,但IMO比DPack的版本弱。

Nothing Beats Productivity Tools by Microsoft and its free. 没有什么能比微软及其免费的生产力工具更胜一筹。

http://visualstudiogallery.msdn.microsoft.com/3a96a4dc-ba9c-4589-92c5-640e07332afd http://visualstudiogallery.msdn.microsoft.com/3a96a4dc-ba9c-4589-92c5-640e07332afd

Don't forget Workspace Whiz - it's free for non-commercial use. 不要忘记Workspace Whiz - 它可以免费用于非商业用途。 I can't live without it and just bought a licence. 我不能没有它,只是买了许可证。 It does many other things too... 它还做了很多其他的事情......

替代文字
(source: workspacewhiz.com ) (来源: workspacewhiz.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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