visual-studio 有没有办法在 Visual Studio 2010 中快速查找文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2667528/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 11:48:07  来源:igfitidea点击:

Is there a way to quickly find files in Visual Studio 2010?

visual-studiovisual-studio-2010

提问by Cody C

Does Visual Studio 2010 have a built-in way to quickly find/open files, similar to the Ctrl+Shift+Ofunction in Eclipse?

请问Visual Studio 2010中有一个内置的方式来快速找到/打开文件,类似于Ctrl+ Shift+O在Eclipse功能?

Edit: Or does Resharper offer this functionality?

编辑:或者 Resharper 是否提供此功能?

回答by Kirill Osenkov

Ctrl+,

Ctrl+,

I'm surprised no one gave the right answer:

我很惊讶没有人给出正确的答案:

Navigate To can show you a list of open files and lots more. http://weblogs.asp.net/scottgu/archive/2009/10/21/searching-and-navigating-code-in-vs-2010-vs-2010-and-net-4-0-series.aspx

导航到可以向您显示打开文件的列表等等。 http://weblogs.asp.net/scottgu/archive/2009/10/21/searching-and-navigating-code-in-vs-2010-vs-2010-and-net-4-0-series.aspx

CTRL+COMMA is your friend.

CTRL+COMMA 是你的朋友。

回答by DShultz

Ctrl+ Alt+ Aopens the command window, type "open" then start typing file names and it will dynamically autocomplete by available solution file name.

Ctrl+ Alt+A打开命令窗口,键入“open”然后开始键入文件名,它将根据可用的解决方案文件名动态自动完成。

回答by alastairs

I use Ctrl+ /to jump to the command bar (same as the search box, but with a > prefixed in the text). I then type "of" (for "open file") and start typing the name of the file to open. Possibly matches are automatically displayed by VS.

我使用Ctrl+/跳转到命令栏(与搜索框相同,但文本中带有 > 前缀)。然后我输入“of”(代表“打开文件”)并开始输入要打开的文件名。VS 可能会自动显示匹配项。

I also found that when using ReSharper, the familiar Eclipse shortcut for Open Type (Ctrl+ Shift+ T) is mapped to ReSharper's GotoFile command.

我还发现,使用ReSharper的时候,熟悉的Eclipse快捷方式敞开式(Ctrl+ Shift+ T)映射到ReSharper的GotoFile命令。

回答by Praveen Mitta

There is also another way to find files in the Visual Studio 2010 might be useful for someone.

还有另一种在 Visual Studio 2010 中查找文件的方法可能对某些人有用。

In the command box in visual studio toolbar type ">of " and start typing the file name it will prompt list. Note: This will only find the class not the pages try it for yourself.

在 Visual Studio 工具栏的命令框中输入“>of”并开始输入它会提示列表的文件名。注意:这只会找到类,而不是页面自己尝试。

enter image description here

在此处输入图片说明

回答by Jeeva Subburaj

this addin will very usefule to quickly open files from visual studio by pressong CTRL + K + O

这个插件非常有用,可以通过按 CTRL + K + O 从 Visual Studio 快速打开文件

http://visualstudiogallery.msdn.microsoft.com/en-us/3eb2f230-2728-4d5f-b448-4c0b64154da7

http://visualstudiogallery.msdn.microsoft.com/en-us/3eb2f230-2728-4d5f-b448-4c0b64154da7

回答by Brad Parks

DPackhas a dialog for finding files in the current solution (search all, or only open files), and it also has a dialog to search the current file for methods,properties, etc. Very nice! Note that the current version only supports VS 2012 or newer, but they have binaries there for older versions of VisualStudio as well:

DPack有一个对话框,用于在当前解决方案中查找文件(搜索所有文件,或仅搜索打开的文件),它还有一个对话框可以在当前文件中搜索方法、属性等。非常好!请注意,当前版本仅支持 VS 2012 或更高版本,但它们也有适用于旧版 VisualStudio 的二进制文件:

http://www.usysware.com/dpack/

http://www.usysware.com/dpack/

You could also try Sonic File Finder, which does something similar to CTRL+COMMA:

您也可以尝试Sonic File Finder,它执行类似于 CTRL+COMMA 的操作:

http://www.jens-schaller.de/sonic-tools/sonicfilefinder/overview/overview.htm

http://www.jens-schaller.de/sonic-tools/sonicfilefinder/overview/overview.htm

回答by Chris

CTRL+SHIFT+Fwill bring open a find in files search dialog box. The result will be listed, usually, on the lower section of VS in a Find Files result box. Double clicking a result will open it

CTRL+SHIFT+F将打开一个查找文件搜索对话框。结果通常会在 VS 下方的 Find Files 结果框中列出。双击结果将打开它

回答by Bharat

In VS2017 or later versions, we have command called "Edit.GoToAll".

在 VS2017 或更高版本中,我们有名为“ Edit.GoToAll”的命令。

SO can configure it from VS tools.

SO 可以从 VS 工具配置它。

see below snap.

请参阅下面的快照。

enter image description here

在此处输入图片说明

I have configured my keys for file search as CTRL + SHIFT + T

我已将我的文件搜索键配置为CTRL + SHIFT + T

回答by Ian

VSFileNav- An extension that I created that allow rapid file searching. It's basically got all the ReSharper functionality that was disabled in the express version of VS2010 (I used to really like this).

VSFileNav- 我创建的允许快速文件搜索的扩展。它基本上拥有在 VS2010 的 express 版本中禁用的所有 ReSharper 功能(我曾经非常喜欢这个)。

It's also free :)

它也是免费的:)

回答by mhenry1384

For file name search I use the Visual Studio Productivity Power tools: http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/It adds a tab to Solution Explorer called "Solution Navigator". It shows all the solution files in a tree and has a search bar at the top.

对于文件名搜索,我使用 Visual Studio Productivity Power 工具:http: //visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/它向解决方案资源管理器添加了一个名为“解决方案导航器”的选项卡。它在树中显示所有解决方案文件,并在顶部有一个搜索栏。

To search for text in all your solution files, use Entrian's Source Search: https://stackoverflow.com/a/9994522/24267

要在所有解决方案文件中搜索文本,请使用 Entrian 的源搜索:https://stackoverflow.com/a/9994522/24267