Sublime Forum

Printing in 3.1


The difference is that there are a number of packages that can do that, whereas packages can’t add 8K support to the core program.



I’ve had to print code exactly once in my entire career. It was more than 15 years ago. If I had to do it now, I would export to HTML and print from Safari, incurring about 10 seconds of inconvenience to achieve the same result. I realize everyone has different use-cases, but really, this doesn’t seem like something they need to drop everything to work on.



Yes, but 8K! LOL! How often have you had to code on an 8K monitor in your 15 year career? Whatever.



As the scaling system already exists, adding a new scaling max value of 3.0 and loading @3 resources next to @2 ones requires just a couple of lines not worth the whole discussion here!

1 Like


Why not? It’s no more effort than the rest of paying customers have to go through every time they have to print something over time.



Note: I’ve moved this discussion to a new thread where the finer points of our decision not to add printing support in this release can be discussed further.

For those wishing to read the previous discussion, please see Printing from sublime.

1 Like


I don’t print my code. Makes totally sense to not implement it. If you want printing you can still copy and paste your code to a publishing software like word, pages, open office etc.



A few years ago I couldn’t imagine 4K. Things going as they go, rendering properly at 8K is certainty a reasonable feature in a few years. It extends existing features, so it’s probably a “why not” thing especially as they’ve been working on the rendering pipeline anyway.

I’ve never printed code. The chances of me ever doing that are zilch.

1 Like


That comparison makes no sense, if you have an 8K monitor you code 100% of the time on 8K. But you don’t print stuff 100% of the time.



So who ever said that Sublime can only be used for code? I often use it for notes and lists and other types of simple textual content, and there have been times when I’ve wanted to print such things.



Sure it does. There are likely way more people who have requested the ability to print their code or other textual uses Sublime is used for than those who have an 8K monitor, let alone code on one.



SublimeText never had print support, so adding print support is adding a new feature from scratch, it’s a lot of work.

On the other hand SublimeText is a software with a GUI, it displays an UI on the screen, the code for 8K support is merely extending a feature that already exists, actually you can consider it as a bug fix because on 8K monitors Sublime would not be displayed ‘correctly’.

And as I said before IF you have an 8K monitor Sublime will now look correctly, before it would not and there was no workaround. On the other hand printing is something that you can workaround, like creating a build system with "shell_cmd": "notepad /p $file".



In the time you’ve spent coming here to gripe (in multiple threads) about this stupid “issue”, you probably could’ve learned to code your own flippin’ text editor.



Or you could have worked around it by not trying to code on an 8K monitor. It’s like wearing clown shoes to run in the Olympics.



On the rare occasions where I need to print my code, I print it from Komodo Edit, which is free and have good printing support… Hope the suggestion can help some of you :slight_smile:



I am not supporting the snarky nature of the thread starter. But I think print is standard and expected as a main feature not a plug in. I don’t code in python :disappointed:. But wouldn’t it be easy to pop out a html page with a window of 8 1/2 x 11 with 1/2 inch margins text in black and white in

 tags prompting print? I think that would work in all OS. just do a window on-load print then exit.

To me this wouldn’t be a priority or focus or anything. just sorta like a bored lunch break activity. But again I don’t python so maybe it would take a lot of core changes or something. More than likely (and I love sublime) the developers like to do something exactly right and are nit picky. Like I said I like the program so your doing something right.

But I program because I love being efficient with my time. having to copy text from sublime into word or something feel inefficient. Installing a plugin to this pc and a others also feels inefficient. I wouldn’t mind figuring out python to help add this feature, but I bet me looking at the source is out of the question…

I love sublime, but I also like not having to do a work-around in what is usually a user friendly application.

1 Like


Please also compare how often you had a chance to use a HD display in the first 7 years of your career vs the next 8 years. :tv:

@wbond: while personally I just don’t care about printing, I guess an official statement about printing would be useful. Until now, I think @jps stated once, back in 2009 or so, that is low priority. Probably an update on this could be useful?



OK I don’t know python but i did manage to write this code which should do what I was thinking. If the dev is interested I can test it out cross platform and what not.

import webbrowser
import os
print ()
f = open('sublimeprintpagethisgetsupdatedoneveryprint.html','w')
message = """<html>
@media print {
  @page { margin:1cm 0 0 0; }
  body { margin: 1.6cm; }

<title> Put the name of the file here </title>
window.addEventListener('load', function() {
  window.onload = function() { window.print();
<body onload='window.print();'><pre> 
The current sublime text


#Change path to reflect file location
filename = 'file:///'+os.getcwd()+'/' + 'sublimeprintpagethisgetsupdatedoneveryprint.html'


Agree. And for that matter how often you needed to print 15 years ago vs. today.

Jokes apart, baked in printing would be handy but for those occasions when I need to print ExportHTML + Chrome does the job beautifully - and actually offers some real benefits: styling, font selection and general post-processing before print. If Sublime had printing baked in I’d probably still use ExportHTML as it would likely be more flexible.

So I can’t see what built in printing actually brings to the table. I’m far more in favour of the necessary time/resources being ploughed into much needed features, expanded API, Sidebar API, code refactoring / intel, performance improvements (esp. large files/long lines), macros that record everything etc. etc… Sublime’s great but in some areas it’s falling behind VSCode, Atom etc., and to remain viable it must keep up with features that users need while offering its own USPs. Just my 2p.



Only few people still use VGA monitors with 640x480 pixels :smile:

These are the people who still print out all their e-mails to have them by hand quickly if needed! :wink:

Save trees, save paper, use wind energy to drive a disk!

I don’t know any pure text editor with satisfying printing features. All of it is a mess. In the very rare cases it is needed ExportHtml package does a perfect Job in exporting the editors content to the browser and immediately open its print dialog to export billions of code to millions of sheets of paper.

It’s amazing that most stupid things cause the most heavy discussions all over the world.