Snap Camera to viewport?

Often while spinning my viewport around a scene I stumble upon a view that for whatever reason, I would rather use than the one my rendering camera is set for.

Currently when this happens, I’ll take a screenshot and try to match the render camera manually.

I’m wondering if it’s possible to have the camera ‘snap’ to the current viewport view? I’ve scoured the hotkeys at excellentwhale and can’t seem to find anything. A python script, perhaps?

Cheers

edit:

on your num pad, type shift+0.

Excellentwhale is really old. You’ll find the function here:

View (in the bottom menu bar of the 3d-view)
Align View
Align Active Camera to View (Ctrl + Alt + NumPad 0)

much appreciated. thanks guys.

Also, look in the ‘Help’ menu : there is there an excellent script by Jean-Michel Soler where you’ll find most if not simply all shortcuts, keyboard, numpad and mouse actions !

Jean