How to prevent rust on guns

I learned this trick while protecting my knife from getting rust. A thin coat of Vaseline and no humidity will ever go to the blade also the Vaseline will bot evaporate and stay on the surface long long time 

On my guns I use it but I'm being careful not to apply on Orings I only use it on the exterior, I'm not sure if the petrolatum is safe for the Orings so use this with caution.

With the heat and humidity I have here in FL I sweat a lot and if I leave a drop of sweat in any par of the gun it will rust in no time. Vaseline has been my secret solution to this problem!