Is there a way to turn on python syntax highlighting for Terminal.app on Mac OS X?
3 Answers
If you just want to highlight sources you dump into the terminal a la cat
try excellent pygments. It actually supports a lot of languages. Run with
pygmentize source.py
If instead you were talking about editing files with syntax highlighting inside a mac terminal, this really depends on the editor.
for
vi
orvim
you want at least these option in~/.vimrc
syntax on
emacs
works right out of the box- don't ask me about
nano
.
Try ipython. It highlights syntax and much more.
I haven't tried it on Mac but looks like it must work:
https://stackoverflow.com/questions/726449/installing-ipython-with-readline-on-the-mac
Another option is WxPython and pycrust (which works without Terminal.app :( )