Of late I have been using SciTE, a lightweight text editor available for both Windows and Linux. It is based on Scintilla – a free source code editing component for Win32 and GTK+. It features syntax highlighting for many popular languages and also automatic indenting of source code. Also you can export the source code into many formats like:
- HTML
- RTF
- LaTeX
- XML