1. Home
  2. Windows Tips
  3. Highlight convert source code into formatted syntax highlighted text

Highlight: Convert Source Code Into Formatted, Syntax Highlighted Text

Highlight is a powerful source code formatter and highlighter that supports more than 150 programming languages, and provides multiple color themes to export code modules into HTML, RTF, XML, LaTeX and TeX format. Since software IDE and development platforms offer support for only a few programming languages, you can use this application to highlight and understand the syntax of any language, and share the code files with highlighted syntax with others to help them understand the programming language code structure. Apart from applying syntax highlighting, it has the ability to convert the source code into formatted text with proper & clear indentation. Highlight is an extensible application, and allows adding plugins, written in LUA framework, to extend the built-in functions, as well as add new features.

Highlight can convert multiple code files into selected file type. All you need is to drag the code files over the main interface to include them in Files tab. From underneath the choose input files section, enter the output folder where files are to be exported; you can enable Write to source directories option to export the source files to their respective folders.

highlight 1

The main window shows the formatted and highlighted code file, while the bottom-left pane lets you change the code highlighting and formatting settings. Under General tab, specify the output file format (HTML, RTF, XML, LaTeX, TeX, BBcode etc), and enable/disable options including add line numbers, Omit header and footer and validate input data. Here, you can also change the default encoding from given Set encoding list.

The Output specific tab allows you to specify external CSS (stylesheet file) for applying customized styles and formatting to report, generate index file and configure Line numbering options.

output specific

The Formatting tab includes code file formatting and color theme settings that you may want to tweak. It lets you choose color themes, reformat type, change keyword case, enable Line wrapping and specify font family and font size.

formatting

When all settings are in place, click Convert files to export the source code files at output location. Once converted, open the file to verify the applied formatting and highlighting style.

html 2

Alongside Files tab, you have Clipboard tab that enables you to paste code modules from clipboard in specified syntax. Before you paste the code, select the syntax from drop-down menu. It will show preview in main window. You also have an option to copy the formatted code (code in preview window) to clipboard.

copy from clipboard

In order to install plugins, head over to Plug-ins tab and add the required plugin installer to the plugin pool. You may need to restart the app to use the newly added plugin. Highlight is a platform-independent tool, and supports Windows, Mac OS X and Linux-based OS, including Ubuntu, Fedora, Debian and FreeBSD.

Download Highlight