Contracts
It is one thing to share a hangar with someone. It is entirely another thing to purchase a hangar with someone else.
Jon, quoted above is very correct and, in my opinion and experience, this will require additional contract language for the exit process for either partner. I have 17 years experience in real estate/rentals/hangers although I disclose that I am not an attorney and you should seek review of any contract by an attorney prior to signing.
Good contract language: This will include things such as: Buyout agreement; Means/process for the determination of a buyout price; buyout terms for payment; buyout based on delinquency of identified partner responsibilities; actual responsibilities; actual liabilities; parking; additional storage of any non aviation items; storage of tools; storage of aviation items; language on responsibilities of utility costs; etc...
Liability: Language of liability, for both parties, due to damage to a partner's property or hanger. Terms for payment of incurred liability. (Insurance usually has a higher deductible than most hanger rash issues therefore terms of payment should be spelled out.)
A real estate and/or contract attorney will not know to cover all items needed for every situation so you are encouraged to spend some time considering all possible issues for your particular situation and putting it in writing. You can always make exceptions to the restrictive language with an addendum. You can NOT enforce an issue that you had no language on unless you have another authority to back you up such as, the airport, fire martial, legal law, city ordnance's, etc...
This is only an example of issues to consider. This is not legal contract language.
Steve, I sent you a copy of a hanger shared hanger agreement of mine, as an example. It may cover some issues you may wish to adopt to your agreement. Have your contract reviewed by an attorney prior to signing.