logoalt Hacker News

maybewhenthesuntoday at 7:40 AM7 repliesview on HN

printing has never really been a thing from text editors I think.

Used to be that printing a text file was just `cat myfile.txt > /dev/lp0` .

It has been a while since I printed a plain text file, but I guess there's still a similar command available with some research.


Replies

geocartoday at 12:16 PM

> printing has never really been a thing from text editors I think.

It's always been a thing: We programmed on paper before we had screen editors, and so early screen editors have always had a way to murder trees on demand:

In vi it's :ha

In emacs it's M-x print-buffer

> It has been a while since I printed a plain text file, but I guess there's still a similar command available with some research.

`lp myfile.txt`

I still prefer using hardcopy for reading/debugging.

namibjtoday at 11:01 AM

I think back in the days before office workers that happened to do their work on a computer had access to the ancient relatives of "Microsoft Word"/"Libreoffice Writer", it was pretty normal for printers to take care of plain text files, with about as much fidelity as manual operation of a classic purely mechanical Typewriter.

Since then printers progressively forgot how to cope with such "documents", though IIRC good-old HP "PCL" should only require about a bare minimum of framing/job control to get a modern printer to handle ASCII plain text.

NooneAtAll3today at 12:30 PM

> printing has never really been a thing from text editors I think.

there's literally ctrl+p shortcut for printing

IdiotSavagetoday at 9:52 AM

TextEdit.app supports printing, so does Notepad.exe (unless they removed that recently).

voidUpdatetoday at 8:53 AM

I've done the same from a raspberry pi to a receipt printer, just piping to lp0

ptmantoday at 10:01 AM

vim/nvim at least have :print