如何在VS2010中的标头和实现之间切换? [英] How to switch between header and implementation in VS2010?

查看:145
本文介绍了如何在VS2010中的标头和实现之间切换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2010中是否有任何键盘快捷方式或免费插件可以在标头(C/C ++ .h文件)和实现(C/C ++ .cpp文件)之间切换?

Is it any keyboard shortcut or free addon in Visual Studio 2010 that allows to switch between header (C/C++ .h file) and implementation (C/C++ .cpp file)?

推荐答案

Visual Studio没有内置的键盘快捷键来回切换.如果您要使用单个键盘快捷键来自动执行宏,那么到目前为止,宏是您最好的选择.有关建议选项的列表,请参见

Visual Studio does not have a built-in keyboard shortcut to switch back and forth. A macro is by far your best bet if you want to automate this with a single keyboard shortcut. For a list of suggested options, see the answers to a previous question.

加载项 Visual Assist X 提供了此

The add-in Visual Assist X provides this feature with the shortcut Alt+O (however, add-ins are not supported by the Express editions of Visual Studio).

如果您尝试避免使用宏,则可以通过另一种方式来获得相似的结果,尽管这是一个双击过程:

If you're trying to avoid using a macro, there is an alternative way to achieve a similar result, although it is a two-click process:

    要从标题切换到实现,请执行以下操作: 右键单击a.cpp文件,然后从上下文菜单中选择转到标题文件".

    要从实现切换到标头,请执行以下操作: 右键单击标题中声明的标识符,然后从上下文菜单中选择转到定义".
    To switch from header to implementation: Right-click a.cpp file and choose "Go To Header File" from the context menu.

    To switch from implementation to header: Right-click an identifier declared in the header and choose "Go To Definition" from the context menu.

这篇关于如何在VS2010中的标头和实现之间切换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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