3 ms·
Vim can do this 1. Open your script/code in vim editor 2. Enable syntax & set the required color scheme :syntax on :colorscheme darkblue 3. Print the file i
by minighost 9y ago
Vim can do this
1. Open your script/code in vim editor
2. Enable syntax & set the required color scheme
:syntax on
:colorscheme darkblue
3. Print the file in PS file format
:hardcopy >/tmp/filename.ps
4. Convert the PS file to PDF format
$ ps2pdf /tmp/filename.ps
5. Now you can open filename.pdf
- adamors 9y agoOn a Mac you can use pstopdf (or just open the PS file in Preview).
- sus_007 9y agoOr convert the ".ps" file into ".jpeg" instead ? 4. Using ghostscript: gs -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -dBATCH -dSAFER -r300 -sOutputFile=filename.jpg filename.ps
- sabarasaba 9y agoYou can also do :TOhtml, then open the html file with your browser and print to pdf. A bit simpler imo.