Embedding code snippets in posts with indentation

I have a privately hosted blog using WordPress, and I am using the SyntaxHighlighter Evolved plugin for displaying highlighted code snippets nicely.

I use the built-in editor in WordPress for writing my posts, but whenever I paste in code snippets, they lose all the formatting they had (indentation). This makes it very hard to create code snippets and share on my blog.

Am i missing anything? Is there any easy way to paste code snippets while keeping their formatting ?

For example, see what code that was indented correctly shows up in the WP editor (lost all indentation):

Topic code syntax-highlighting visual-editor admin plugins Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.