Listings alternative
Try the minted
package. It uses the external Pygments
python syntax highlighter and is therefore quite powerful. You need to use the -shell-escape
option to allow it to call the required external executables.
And there are GNU Source-highlight:
http://www.gnu.org/software/src-highlite/
and hightlight:
http://www.andre-simon.de/
They can export LaTeX code.
PS.
In ConTeXt, there is a t-vim
module, which calls VIM to highlighting the program code.