How to make sublime text the default file viewer for all file types it supports
Select an .hpp document and get info on it (command-i). In the resulting window, you will see an "Open with" section. Select the appropriate app to open it with from the little menu and then press the "change all" button immediately below that menu. That will change all the .hpp files to default open with the app you chose. 

To do this categorically (for multiple file types at once), I'm not so sure...

Good luck!