Is there a good and fast way to print (on paper) the syntax of the code?

I'm going to the farm. I think there are no computers there and my laptop is broken. I want to print the code of some of my projects on A4 paper, so I can view it while I'm there. It would be nice if it were printed with syntax highlighting.

Editors: Vim, Notepad ++

Code: HTML, CSS, Javascript

+4
source share
4 answers

In emacs, use ps-print-buffer-with-faces . There is also ps-print-region-with-faces for cases where you need only part of the file ...

Use Mx <command> to invoke commands by name. Use Ch f <command> to get help on the command, and also find out what (if any) is associated with it.

+2
source
  • The a2ps tool creates nice PostScript files for printing a list of programs.

  • Vim has :TOhtml command that creates HTML with the current open file selected according to Vim's syntax coloring. For this, GVim has Syntax -> Convert to HTML .

  • If you are using LaTeX, check out the listings package ( CTAN pdf ). This is a very good solution to include your code in the documentation / presentation .

All of these tools support the syntax of many programming languages ​​(and non-programming languages).

+1
source

Editplus prints with syntax highlighting

+1
source

Source: https://habr.com/ru/post/1300505/


All Articles