A stealth/vanish macro I've found quite useful for PvP/farming/bossfights.
1) Dismounts you if mounted.
2) If you are stealthed, destealth.
3) If you are in combat and not stealthed, vanish.
4) If you are not in combat, stealth.
It does not use vanish when you are in combat and already stealthed (at least I hope so, just recently added the second line which should prevent exactly this).
#showtooltip Vanish
/dismount
/cast [stealth] Stealth
/cast [combat, nostealth] Vanish
/cast [nocombat] Stealth