5 Minute Snack: Copy source code with formatting

Showing source code on the web has become rather easy using some decent free PHP formatting tools. When you want to put source on Microsoft PowerPoint slides or inside a Microsoft Word document, the options become rather slim.

So, if you are in the same dilemma, here’s a list of some tools that will definitely help you:

  • GExperts – a wonderful set of  wizards and IDE extensions that make your life a whole lot easier. It also offers a feature to copy source code as HTML.
  • CnPack – yet another assortment of wizards and IDE extensions. They also offer the feature to copy source code into the clipboard with all formatting in place.
  • TMS IDE Rich Clip – an IDE plugin exactly written for this purpose. It adds two menu items to your edit menu that allow you to either copy the source code as HTML or as RTF.

All the afore mentioned tools are freely available for most Delphi versions out in the real world. Disclaimer: Please check the individual licensing options.

This is what TMS IDE Rich Clip looks like in the “Edit” menu of the IDE…


…with the RTF content in Microsoft Word:


If you just want to add the ability to copy formatted source code to your IDE, then the TMS is simply the best option. You might still want to have a look at all the features that GExperts and CnPack offer as they are two amazing libraries that will truly enhance the Delphi IDE.

Tags: , , , , , ,