I have occasion to need to print code (Horrors!!! ;) ), and i was wondering what editor or tool would i use to print that code out with proper formatting and syntax highlighting
Add this line to ~/.bashrc
if you are using UBUNTU
or, to ~/.bash_profile
if you are using MAC
If that file does not exists, create it.
alias lprc='vim -me -c ":syntax on" -c ":hardcopy" -c ":q"'
source ~/.bashrc
or source ~/.bash_profile
To print colored hello.py just do this:
lprc hello.py
instead of lpr hello.py