Is there a way or an addon to swap between .h and .cpp files?

I’ll often read people’s code on github and swapping between .h and .cpp files can be a bit of pain depending on how the project is structured.

Is there a way to do this easily, or a plugin that could help?

Not that I know of. You could, however, consider just cloning the repo and opening it up in your favorite IDE. But I do understand that might be a bit of a pain if you just quickly want to read up on some code.