Visual Studio 2008宏在头文件和源文件之间切换?

时间:2022-04-03 10:14:11

Does anyone know how to make a macro or something to switch between foo.hpp and foo.cpp? I would really appreciate having a macro like this. I guess it would help if it actually opened the corresponding file, but kept the old one in a tab.

有谁知道如何制作宏或在foo.hpp和foo.cpp之间切换的东西?我真的很感激有这样的宏。我想如果它实际上打开了相应的文件会有所帮助,但是在标签中保留旧文件。

Thanks

5 个解决方案

#1


Perhaps one (or a combination) of the following will help you:

也许以下一个(或组合)将帮助您:

#2


Why not use right click > Go to declaration | Go to definition?

为什么不使用右键单击>转到声明|去定义?

#3


In Visual Studio 2013 it was added as Ctrl + K, Ctrl + O

在Visual Studio 2013中,它被添加为Ctrl + K,Ctrl + O.

#4


Some of the options ran slow for me in large projects. This one doesn't look in other folders but works faster and should cover most needs: switch between .cpp & .h files

在大型项目中,有些选项对我来说运行缓慢。这个不查看其他文件夹,但工作速度更快,应该涵盖大多数需求:在.cpp和.h文件之间切换

#5


You could try using 'Switch' - this is an addin that switches between source and header files, but also lets you switch between other types of related files - XAML and codebehind, designer and code etc etc. Switch

您可以尝试使用'Switch' - 这是一个在源文件和头文件之间切换的插件,但也允许您在其他类型的相关文件之间切换 - XAML和代码隐藏,设计器和代码等。

#1


Perhaps one (or a combination) of the following will help you:

也许以下一个(或组合)将帮助您:

#2


Why not use right click > Go to declaration | Go to definition?

为什么不使用右键单击>转到声明|去定义?

#3


In Visual Studio 2013 it was added as Ctrl + K, Ctrl + O

在Visual Studio 2013中,它被添加为Ctrl + K,Ctrl + O.

#4


Some of the options ran slow for me in large projects. This one doesn't look in other folders but works faster and should cover most needs: switch between .cpp & .h files

在大型项目中,有些选项对我来说运行缓慢。这个不查看其他文件夹,但工作速度更快,应该涵盖大多数需求:在.cpp和.h文件之间切换

#5


You could try using 'Switch' - this is an addin that switches between source and header files, but also lets you switch between other types of related files - XAML and codebehind, designer and code etc etc. Switch

您可以尝试使用'Switch' - 这是一个在源文件和头文件之间切换的插件,但也允许您在其他类型的相关文件之间切换 - XAML和代码隐藏,设计器和代码等。