Visual Studio 2008 macro to switch between header and source files?

空扰寡人 提交于 2019-11-30 16:55:47

问题


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.

Thanks


回答1:


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

  • Switch between a Header and a CPP File in .NET (a macro at codeproject)
  • Switch between header and impl files in VS.NET (describes how to create the macro and bind it to a key)
  • Switch between Source and Header C++ Files (A recent macro from codeguru)
  • Macro to Switch Between Header and CPP File (An old macro from codeguru)
  • Several other solutions found on Google...



回答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




回答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




回答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



来源:https://stackoverflow.com/questions/706938/visual-studio-2008-macro-to-switch-between-header-and-source-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!