Sublime Forum

Printing

#12

People are going to continue to request a built-in Print function until one of two things happens:

  1. Sublime Text finally gets a built-in Print function
  2. Sublime Text stops attracting new users, who are then surprised to find that there is no built-in Print function.
0 Likes

#13

[quote=“facelessuser”]
Please create an issue at the repo as I will forget about the issue if it isn’t tracked there. I imagine it would be an optional feature, but completely doable.[/quote]

Done. Incidentally, I found a workaround that gives me the behavior I desire. I set highlight_selections to false, and set valid_selection_size to a ridiculously high value. :smile:

0 Likes

#14

I don’t need to print, but my professor does! It is so easy to implement, why are you being so dogmatic against it?

0 Likes

#15

Absatively posillutely!! Printing is a must. Why should I have to go to another program to print? Every other editor I have used has a print function. It is probably one of the easiest things to implement.

0 Likes

#16

@previous two posts

I don’t think anyone is being ‘dogmatic’ about it, least of all Jon. AFAIK he’s never outright said that printing won’t be included in Sublime. From his perspective I guess that inbuilt printing is a minority request, that printing is easily achieved and that there’s a raft of other things that are just higher on the priority pile.

In trying to understand his reasoning, my guess is that the payoff for implementing a multiplatform print facility just isn’t there in the author’s view, at least for now. It has to be written to work across all platform print systems and, done properly, should have a bunch of ‘expected’ features like pagination, optional colouring, font selection etc. etc… It’s not difficult programming, but such things can be surprisingly time consuming.

At the risk of tediously repeating myself, the workaround of using ExportHTML is actually beneficial over an in-built print function in many situations, at least for me. Browsers have all this built in across platforms, and since the code ends up rendered in markup it can be easily styled using CSS and rendered to the printed page exactly to taste. Inbuilt print facilties rarely sport such flexibility. User CSS can be created to unify print style for teams or companies. In the end, printing is just a couple of extra mouse clicks / keystrokes which could be further simplified with a plugin.

The above won’t quell those who’d love a built in print function but I’m sure the author is well aware of its lack. I doubt he’ll shift his priorities on this, since occasional complaints have been dripping in for the last x years. The fact is that the majority seem more than happy with the ExportHTML approach and those who have a specific need for advanced inbuilt printing should probably look elsewhere. I’d love someone hear a specific reason as to why ExportHTML is unsuitable beyond the (rather dogmatic) ‘it just should be built in’ argument.

0 Likes

#17

Can I ask why you are all printing your code?

It’s clearly a feature that many are asking but, but I can’t figure out why someone would want to print their code.

0 Likes

#18

@wesbos I’m not particularly concerned about printing myself, (i.e., I don’t mind copying out somewhere else to print) but I figured I’d add that on top of the tens of thousands of lines of code I’ve written in ST over the past few years, I’ve also written essays, tweets, blog posts, documentation/guides, poems, letters, reminders, flotsam (links, phone numbers, emails…), etc. I also use it at least a few times a week to quickly manipulate/scrub/transform data/text/logs.

In short, because ST is good, lightweight, familiar and almost always open on the desktop of every system I use regularly, it ends up being the default capture location for much of what I do beyond code.

Inevitably, I’ll find myself wanting to hit print on something in ST several times a year. Pragmatically I’ve little interest in seeing more useful features languish for something like this, but I’ll still be happy if it turns up some day.

1 Like

#19

Ditto to abathur. Perhaps you are not aware that a lot of people do not have computers or just plain hate them. Therefore, for my clients, I need to print out instructions, directions and a myriad of other things for them. I don’t use a text editor just for coding. I might use it to make a quick fix to some code or to edit data files. I don’t see text editors for just coding (it’s not an IDE) - I and many others us it for a variety of other reasons.

0 Likes

#20

I’m not printing my code. I used Sublime Text as my single text editor. It also lets me code, but I don’t only use it for that. If I open it to quickly write down a grocery list, instructions for something I need to do, or any other .txt document I have saved with similar content, I want to be able to print that out and take it with me. Like every other text editor in existence. Sublime Text shouldn’t be a coding only utility when everything else about it makes it an excellent text editor - aside from this. Up until now, I’ve had to copy / paste between ST and Word.

I’m taking a look at some alternatives now. But if ST is meant to not be a text editor in any way, it should advertise itself as only a programming tool. Alternatively, if the authors want it to be used as a text editor also, they need to include this basic feature that’s part of every text editor.

I bought ST, as a text editor+, because I had stupidly assumed it would have the ability to print. I was completely shocked when I discovered it didn’t.

1 Like

#21

Here’s my solution, based on all of the posts I read. I couldn’t get any of the plugin methods to work, but ended up with something “simple” anyway. I’m using Windows and I only care about direct text printing, without any kind of formatting - I just want to print the straight text from ST to my default printer.

  1. I downloaded DOSPrinter.
  2. I created Print.sublime-build in my Packages\User directory:

{ "cmd": "C:\\Tools\\DOSPrinter.exe", "$file"] }
When I want to print, I just make sure I’m using “Print” as my Build System and hit Ctrl-B.

0 Likes

#22

Absatively posillutely!! Printing is a must. Why should I have to go to another program to print? Every other editor I have used has a print function. It is probably one of the easiest things to implement.

1 Like

#23

Because the editor you are using doesn’t have a print function.

I would make a guess that almost every person who has said “It’s probably one of the easiest things to implement” has never had to actually implement it, much less on a cross platform application that runs on 3 completely different platforms. Historically, some of the most popular editors relied on 3rd party tools or plugins to implement printing. Vim and Emacs both used to convert documents to postscript then try to send them to the printer using the local postscript driver through a third party program like lp. That mostly worked. I used to “print” my documents to pdf and then used adobe reader to print so that I could get pretty printing in the code documents I would turn in when I was working on my CS undergrad.

There are a lot of questions that you need to answer to get printing right. For some people, they don’t care if their printed documents are syntax hilighted. For others, that’s an absolutely critical feature of printing. How do you handle the case of wanting pretty printing, but the colors the user has chosen for the editor are not compatible with printing on white paper? The fact is, all these other editors you mention have a person on the team whose whole responsibility is to make printing work. That’s what that guy does, and that’s why they can provide that as a feature. ST is a one man shop.

I have rarely heard anyone who doesn’t want to use the plugins give any other reason other than “I shouldn’t have to do it that way.” One person said he couldn’t use the html plugin because he had html files associated with an html editor on his computer instead of a browser. That’s a legitimate beef.

0 Likes

#24

Pardon my analogy:

I effectively bought a Maserati for a text editor; however, when showing off my nice Maserati to my friends, I was mortified to find out that it doesn’t have any seats…I mean, why would anyone make a Maserati without any seats. Here I was, trying to convince my friends to buy a Maserati so they could experience how awesome they are, and when they find out they don’t have any seats they just roll their eyes at me because I spent so much money on a car that doesn’t have any seats. Who cares if I don’t really “need” to sit down when I am screaming down the road because the car looks real nice on the outside, and can do some amazing things on the road. But common folks…the thing does not have any seats!

I was shocked to find out that Sublime Text does not have a basic print feature. Honestly, after spending seventy dollars on a tricked out text editor with syntax highlighting and IDE features built in, I felt a tad bit betrayed that my car did not have any seats. I mean, who would build a car without seats? I don’t care how hard it is to add printing, for a seventy dollar text editor, it darn well should have basic printing. Not some crazy answer of, “it’s on the list, but not a high priority” for seven freaking years. No, for seventy dollars you should be able to spend a few weeks, months, or pay some computer science kid that is just coming out of college to put something together that would at least print basic text.

That said…I still use ST for my everyday text editor, my regular coding text pad, and for a laugh when the average user points at me and asks why I spent so much for a text editor that doesn’t print. It is a great piece of work…it just doesn’t have any seats!

1 Like

Print File?
#25

I disagree, printing would be at best a cigarette lighter in your car analogy: both clearly a relic from the past and unnecessary for the vast majority of customers. Leave printing support to the plugins.

2 Likes

#26

Although i would definitely be willing to degrade the impact of my analogy to something slightly less severe than seats, I can definitely say that a lighter hardly felt like something that had the gut reaction of a missing print feature. Perhaps headlights, wipers, or a muffler. But certainly not a cigarette lighter.

Interestingly, relegating printing to a historic object may be a bit premature as well. I do agree that printing has become something that is definitely less necessary in more recent years, it is still quite useful in today’s business world. There are many times when electronic transmission is either less efficient due to security restraints in a high security environment, more time consuming due to electronic compatibility requirements not being met, or simply not desired by superiors of a more respectable age…ehem…experience level that are not interested in reading from a monitor.

Okay, I got it! How about a head unit (radio, mp3 player, stereo, whatever you want to call it). Listening to the radio on the road seems to be something that has definitely decreased for many people that now prefer to hear their phones over bluetooth whilst driving. However, there are quite a few people that would find buying a car without some kind of head unit/radio a bit odd. And I’m not sure how sales would be for a company deciding that not enough people listen to the radio to warrant pulling them from their models. It doesn’t seem like a good business decision to nix such an inexpensive feature when compared to possible backlash from not providing said feature. I mean, we are talking about printing, not writing to floppy disk, which this program could probably do if floppy hardware were installed. I actually find that last fact very ironic and quite hilarious to be honest. :slightly_smiling:

1 Like

Printing Capability
#27

As I mentioned in my earlier post, is there a reason you don’t want to use any of the plugins that provide printing through the browser?

3 Likes

#28

Because this is so simple and basic functionality in the text editor; it should be done “out of the box”, not through strange plugins sending text as HTML to the web browser :open_mouth:

1 Like

#30

Why I need a real print, my useCase and your career !

I love sublime !

I am 67, I have programmed a lot, and I don’t program anymore! I have used PMate, Brief, TextMate, Sublime (apart from pmate, more or less an evolution, more of the same, just better). Today I use Sublime on OSX and a little bit on Linux Debian.

I do write and most of all structure complicated texts, which naturally, most people would write on papersheets, and have a full desk full of papers, rewriting the notes, merging them, splitting them …

How nice to be able to use the Sublime project commands, to be able to create on the fly a new file without saving/naming it, even to be able to quit without saving, to use a global search, and to manage all these complex things without caring about futilities.

Try to do this with Word, (or Nisus, which I enjoy more)

In my case, layout/formatting is typically pretty trivial. Markdown is more or less sufficient. I probably will end up with orgMode because of the tables.

And quite often, I do need to print, to discuss some notes, to take them with me when walking or whatever. And it is nice to have printed paper to be able to annotate it on the fly with a pen. (Besides, eyes weaken withe age, and always using a computer screen is not a good idea from a health point of view)

As a punchline, many IT-careers evolve in management tasks, and one of the most important capacities when growing older is the capacity to structure complex information. And therefore you need good tools like sublime. And quite often, you do print.

I don’t want to learn a new tool. I already know a highly sophisticated editor, running on any relevant environment. Would you want to change :wink:

When growing older, one needs to communicate more and more, and writing about complex subjects is a natural way of handling this.

So to summarize, as a Christmas gift in 2021 ?? :wink: , I would very much appreciate having

  • a print facility, integrating pandocs, or whatever, and even ideally
  • org-mode support, (Org mode on Emacs permits outlining and restructuring better than Word or even Nisus)

Thanks for reading me, thanks for Sublime, and Cheers

Mathias

1 Like

#32

I believe someone in one of these print threads said that something along the lines of .00000000001% of ST users wanted printing . . . and yet printing is a recurring request from users.

So, not only was the ST4 upgrade a big shock, but this whole printing thing is still a PITA. If there was a poll that was published on features that people wanted to see, I have no doubt that printing would make it to the top of the list. . . and yet the developers clearly ignore the clamour.

Of course, the ST apologists question the use case from those users although we shouldn’t have to defend our use case for printing out of the box (and not through some stupid HTML plugin or via a browser) to anyone. Do I print my code? Very rarely. Do I print little snippets of text from my daily used text editor? Yes, I do, and I do that at least every few days, and yes, that SHOULD be built in.

I bought ST3 years ago and I even tried to pay for the upgrade to ST4+Merge (but my valid cards were declined). Reading through these forums reminded me of that nagging print issue, so I’m having 2nd thoughts on trying it again.

So, call me a whiner if you will, along with those other so called .00000000001% who have requested a native print function, but having to add ‘print’ as some 3rd party mod sure seems like old school neckbeard behaviour on the part of the devs to me.

1 Like

#33

Userecho was used in the past to poll what features people wanted. According to that printing is the 168th most requested feature. Given how much work cross-platform printing is, especially doing it with a proper print dialog and settings, the current approach of using the web browser to print (which is now built-in for ST4) is as far as printing support is ever likely to go.

2 Likes