Sublime Forum

Printing from sublime

#141

My 2 cents: I would rather sublime stays as fast and performant as it is. To me, that is it’s key feature.

If someone could make a plugin to do this I think that would be okay, but I could do without all the possible problems and extra processing that might be associated with supporting printing to hardware,

0 Likes

#142

A low priority for you but not for your customers. Please escalate.

1 Like

#143

I was thinking of using sublime text 3 as my default editor and purchase it…
No print - nah thanks.
even kate or leafpad or whatever gui text editor on linux does print.
I tried Simple print function for Sublime Text 2 and 3… no way couldn’t make it work

0 Likes

#144

Windows solution for printing in Sublime Text

This is a simple, effective, and versatile solution that uses the Build feature. No enscripting needed!

  1. Download printText.exe. This program will print a text file whose path is specified on its command line. The program prints only saved files; unsaved changes will not be printed.

  2. Since Sublime Text cannot directly call this program, create printText.cmd as follows, but add the full path to printText.exe.

    START "Printing %1" "printText.exe" "%1"

  3. Copy the following text into \Data\Packages\User\Print2.sublime-build (a new text file that you create) in your Sublime Text directory, but add the full path to printText.cmd. When you add the full path, convert ‘’ to ‘\\’ (double backslashes) in the path.

     {
         "windows":
         {
             "cmd": ["printText.cmd", "$file"]
         }
     }
    
  4. In Sublime Text, select Tools > Build System > Print2

  5. Add the following line to the User file in Preferences > Key Bindings, so that you can print with CTRL-P.

    { "keys": ["ctrl+p"], "command": "build" },

Pressing CTRL-P will then run your new “Print2” build file, which will send the to-be-printed file’s path to printText.cmd. The CMD batch file will then send the file’s path to printText.exe, which will print the file.

That’s it!

Mike

0 Likes

#145

Why is there no print facility within Sublime?
I do not understand why this most basic feature is not included.

0 Likes

#146

because 99% of ST users don’t want the ST devs to waste their time on something they will never use, and for which plugins exist that do a decent job anyway

1 Like

#147

It seems like over the last 9+ years in spite of several requests, chime ins, +1s, this isn’t really a feature that might take any sort of priority. At least care to say, we’ll NOT implement this so it spares some time for people who are looking for it and will look for it elsewhere. Even Notepad (which imho nobody uses as a text editor) has this option.

0 Likes

#148

It has actually been stated by Jon already that this isn’t an area they wish to focus on. People just keep creating new threads.

2 Likes

#149

Note to developers:
The lack of a print feature caused my team to rule this out as an editor.
250 developer licenses lost to one bad decision.

_O_/

1 Like

#150

And how many people would have picked a different editor if we spent time on printing instead of Goto Symbol in Project, or Goto Definition popup, or decent syntax definitions, or proper support for Windows high DPI.

Saying yes to one feature means saying no to one or more other features. In this case, the work of trying to make cross platform printing “just work” is significant enough and the priority low enough that we’ve chosen to work on other aspects of the editor.

It seem we aren’t the only ones: 1, 2. Meanwhile, plenty of people have pointed to packages that provide a mechanism to allow for printing.

9 Likes

#151

No worries. Clearly, there are other companies who are more than happy to have more paying customers and provide all of the core functionality developers are looking for.

1 Like

#152

What I find “funny” in this “conversation” is that not one of the people requesting the print feature can explain why they refuse to use the Export to Html plugin which works perfectly fine …

5 Likes

#154

Here’s an explanation of why I “refuse” to use the Export to Html plugin…

I’d love to use Export to Html. I fought for a long time to get my company to buy me ST3. When I finally convinced them all the features I needed in a text editor could only be found in ST3 and it was finally installed, its was locked down for security reasons so I couldn’t install any plugins! There are a number of plugins I would love to add to my copy, but none are available to me.

I understand:

  • Some people don’t need to print
  • I could always copy the text into another editor to print
  • Adding printing to ST3 is a non-trivial process

But, being lazy and having a locked-down version of ST3, it would be nice to have basic printing.

2 Likes

#155

Are 250 developers actually printing code to physical paper or just PDFs?

0 Likes

#156

Is this a joke?

10 years later you STILL can’t print from Sublime?!

0 Likes

#157

Mmmm… I’m not interested in this feature at all but I wonder, how would you guys implement this feature?

  • Would you print the highlighted text or just the flat text?
  • What would you do about rendered content such as phantoms / images / …?
  • How would you deal with folded regions? Or would you print the whole buffer?
  • What about oneliners such as this, would you truncate the printed output?

Few times I needed to print from Sublime content what I did was:

  • Copy/paste to Microsoft word and print, done
  • Export to html/pdf and print, done

In any case, for me, as a coder, this is totally an uninteresting feature but the guys asking for it are
not even explaining how this feature should work at all :open_mouth:

Said otherwise, you want to print… but printing what? :slight_smile:

0 Likes

#158

BPL strikes home with me on this. I rarely need to print code, but have had in the past to do it or I also use Sublime for other things than code which I would like to print at times.

Over the years, I have vim and emacs alongside Sublime. Each of those provide no printing functionality. Where vim and emacs, however, have shone for me was that they provided a very convenient alternative. Export…export to markdown or html or straight to pdf. So easy to print afterwards or reformat using pandoc.

There is a package for Sublime that seemed to hold some promise in my research for similar functionality and it’s called Highlight, but it is an archived on github package (meaning it doesn’t get any move love from its maintainer), hasn’t seen updates in years and has a bunch of unresolved issues. This package or a similar one could fix the printing issue very well, but not in the state that this package is in at the moment.

1 Like

#159

ExportHTML exists and does the job well enough for most, just like in, say, vim.
I have never needed to print my code or even simple text, so I wouldn’t know.

1 Like

#160

Users requesting this feature have failed expressing clearly what this “printing feature” is all about or how should behave basically.

In fact, maybe even ST devs at this point don’t have clear exactly which are the requirements or how this feature should behave… they’ve probably concluded a while ago what users were asking for here was already possible to achieve and this was just discarded… which makes sense. How can you even estimate how much effort a particular feature should take if you don’t even have clear the requirements… :frowning:

IMHO in office packages such as MsWord the so called printing feature is obvious but in a text editor such as sublime not so much… My 2 cents :stuck_out_tongue:

1 Like

#161

The Print to HTML package works perfectly fine for me. Pops open a browser tab, and there you go. Integrated printing is a non-trivial task across multiple platforms. There are packages that can handle this fine through other avenues and it appears to be a low priority capability in the aggregate.

Personally I think folks just pop by periodically to necro this thread for troll purposes.

1 Like