Are you want to share code snippets in chatter and maintain formatting as well, then this tutorial is designed for you. Sales force introduced this feature in Winter 2017 Release but this features is only available for the Lightning Experience not with the Sales force classic experience.
For the more information, see the Sales force Release Notes for Winter 2017 release.
Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies. View all posts by Prem Tiwari