Hacker News new | ask | show | jobs
by stephencweiss 2690 days ago
Random question -- how do you print code? Do you copy the file into a text editor? I've looked a few times and it seems like Sublime and VSCode both don't have a print feature...
2 comments

I mean, just save the file as .txt and open it in Notepad, TextEdit, or whatever is the default editor in your desktop environment of choice. Should have a print function.

Otherwise you could stick it in <pre> / <code> tags in an html file, open it in a browser, and print from there.

Lots of options...

I paste the function into geany (I’m on Linux) and print from there.

Usually I have IntelliJ open and it can print quite nicely.