Hi all,
I sent my code to my friend over Gmail but as you guess, the code is not highlighted in Gmail. Is there solution to highlight code that is sent over Gmail?
Hi all,
I sent my code to my friend over Gmail but as you guess, the code is not highlighted in Gmail. Is there solution to highlight code that is sent over Gmail?
Paste your code to an online (maybe offline) syntax highlighter, like http://tohtml.com/ . Then copy/paste it to gmail & send.
Unless you absolutely have to have the code in the email, I would just put your code on Pastebin and link to the code.
If you must put your code in the email, you could use a GreaseMonkey script such as this C++ highlighter, however that will not work for the person you're sending it to, only you. Another solution is to export your code as HTML (with coloring), and send it to the person as HTML. Try Visual Studio's CopySourceAsHtml plugin if you're using Visual Studio.
If your language is not available at http://tohtml.com but you use GitHub you can also paste into a (private) gist there - http://gist.github.com/ - then copy&paste back to gmail.