I am not really that familiar with Nano (only time I use it is during the Gentoo installation process), but vim
supports syntax highlighting and a zillion of other neat features that you could want when programming. Make sure to check out the Tips And Tricks and Scripts sections at the vim website.
Vim is often installed by default with most distributions. If not, it should be easy to build from source.