TLWIR Special: Formatting Your Code in GNU/Linux With Highlight

Posted by acrossad on Feb 12, 2012 11:22 PM EDT
BeginLinux.com; By Rex Djere
Mail this story
Print this story

Summary: As a C++ programmer, I like to program coding examples, and then paste them into tutorials on websites. I used to use web based solutions to format and highlight my code. These solutions usually have you paste the code in their web page. The web page then color-highlights the code, and allows you to download the formatted result. This can be a pretty good solution, but I really wanted a solution that I could use on my GNU/Linux PCs. Highlight is a wonderful program that provided the perfect solution. Highlight isn’t just for highlighting C++ source code; it can handle PHP, C, C#, Perl, Python, or just about any programming language that you can throw at it. In this article, I will show you how to use Highlight to format your code perfectly every time.

Why Would You Want to Format Your Code? Raw C++ code can look somewhat unattractive when displayed on a web page. Let me give you a simple example of an unformatted C++ program.

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Community

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.