简体   繁体   English

如何在visual studio .net中快速打开文件

[英]How to open a file quickly in visual studio .net

In visual studio, we can open a file in a #Include statement by right clicking the filename in include statement and then clicking "Open Document". 在visual studio中,我们可以通过右键单击include语句中的文件名然后单击“打开文档”来打开#Include语句中的文件。 But sometimes, when I want to open a file, I don't remember where it was in the project or where has it been included. 但有时候,当我想打开一个文件时,我不记得它在项目中的位置或者包含在哪里。 What I do is that I open any file, add a #include statement for that file, then right-click->Open Document to open the file and then remove the #include statement that I added just to open this file. 我所做的是打开任何文件,为该文件添加#include语句,然后右键单击 - >打开文档打开文件,然后删除我刚刚添加的#include语句以打开该文件。

Can someone plz tell me a more straight forward way of quickly opening a file without searching for it? 有人可以告诉我一个更直接的方法来快速打开文件而不搜索它吗?

I am using Visual Studio 2008 我正在使用Visual Studio 2008

Hit Ctrl + / to go to the "Find" combo box in the default toolbar, type >of Foo.cpp , and hit enter. 按Ctrl + /转到默认工具栏中的“查找”组合框,键入>of Foo.cpp ,然后按Enter键。 of is the "open file" command and will give you autocompletion with the files in your solution. of是“打开文件”命令,并给你与解决方案中的文件自动完成。

This also works for any other system or library header files you include (eg windows.h ). 这也适用于您包含的任何其他系统或库头文件(例如, windows.h )。

在此输入图像描述

The leading > character tells the "Find" combo box to act like the Command Window, so any commands that work in the Command Window work in the combo box as well. 前导>字符告诉“查找”组合框像命令窗口一样,因此在命令窗口中工作的任何命令也在组合框中工作。

Visual Assist X's "Open File in Solution" (command VAssistX.OpenFileInSolutionDialog) works great for quickly opening a file. Visual Assist X的“在解决方案中打开文件”(命令VAssistX.OpenFileInSolutionDialog)非常适合快速打开文件。 I find it faster to use than Visual Studio's ">of" command. 我发现使用它比Visual Studio的“> of”命令更快。

See http://www.wholetomato.com/products/featureSearch.asp for a screenshot. 有关屏幕截图,请访问http://www.wholetomato.com/products/featureSearch.asp

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

相关问题 无法在Visual Studio 2012中打开头文件 - Cannot open header file in Visual Studio 2012 无法在 visual studio 2022 上打开源文件 - Cannot open source file on visual studio 2022 如何在 Visual Studio 中调试由另一个进程调用并很快结束的 C 应用程序? - How to debug a C application that is called by another process and ends very quickly in Visual Studio? visual studio c++ 如何正确使用 fopen() 打开 txt 文件 - visual studio c++ how to properly use fopen() to open txt file Visual Studio 2013:“无法找到或打开PDB文件” - Visual Studio 2013: “Cannot find or open the PDB file” 无法在 Visual Studio Code 中打开源文件“stdio.h” - Cannot open source file "stdio.h" in Visual Studio Code 无法在 Visual Studio 中打开源文件 err.h? - Cannot open source file err.h in visual studio? 如何在没有visual studio的情况下编译C文件 - How to compile a C file without visual studio 如何在Visual Studio Express上运行AuBio(开源C程序) - How to run AuBio (an Open Source C program) on Visual Studio Express 如何在给出额外输入的情况下使控制台输出窗口在Visual Studio 2015中保持打开状态? - How to make the console output window stay open in Visual Studio 2015 stay open when extra input is given?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM