Sublime Forum

Printing from sublime

#105

Speaking for myself, I never had to print code on paper since more than a decade.
I may be an exception to the rule as I prefer to read on screen, particularly speaking of code, and if I really have to print something is 100% of the cases a *.pdf or .doc files, and both aren’t handled by ST, so I never missed that funcionality…
Anyway there are packages that, even though I never tested them, let you print:
Simple Print Function (should be crossplatform)
QuickPrint (Win
only)

0 Likes

#106

I have now switched all my text editing to Sublime Text, not just source code. Recently I’ve found that I am copy’n’pasting into another editor to print on a regular basis. When you consider that Sublime Text is by far the best editor in the entire history of text editors (how did I live without Multiple Selections?), and the winner by a mile — think Usain Bolt racing against a bunch of 5 year old kids — it is gobsmackingly strange that printing is not supported.

And I want the works !! Print preview, line numbers on or off, fit to page, font/size control, print whole file or selected text, and the colours of my chosen theme used. SublimePrint is a poor substitute for all that.

0 Likes

#107

Printing support would be useful even if it was just to pdf.

0 Likes

#108

Just use this 50kb Plugin >>ExportHTML ( Package Control )

[quote] Features

Export to HTML using any tmTheme for syntax highlighting
Can handle any language supported by ST2
Supports bold and italic theme font styles as well
Configurable output
Format suitable for copying and pasting in emails
2 included tmTheme files for color and grayscale printing (but any can be used)
Export only selections (multi-select supported)
Export and show highlights (multi-select supported)
Toggle gutter on/off in browser view
Automatically open browser print dialog (optional)
Enable/disable configurable word wrapping
Configurable toolbar to appear in the generated webpage

ExportHtml comes with a number of default commands available, but these can be overridden in the settings file.
Or you can create commands directly outside of the settings file bound to the command palette, key bindings, or even the menu.
[/quote]

Then use the command palette to open the configuration or your browser print dialogue.
From there you can choose your paper or PDF printer.

.

1 Like

#109

Come on guys, its been 5 years, still can’t print.

I paid for a version, I like it a lot, but I often want to print out some code to study and annotate.

0 Likes

#110

I also think a built in print function would make life easier. I was confused by the lack of one at first, and actually waited longer to become a paid user because it seemed like obvious functionality was missing. That said, I found one plugin that allows printing of selection to the default printer, and also the plugin that prints to HTML. The latter opens the code in a browser window so you can just print it from there. It adds a step that shouldn’t really be necessary, but it works well.

Install package control here: sublime.wbond.net, then search for “print” and you’ll find several options.

0 Likes

#111

yes, printing from a text editor is a feature most of us expect. please make it happen.

0 Likes

#112

I was shocked and confused today when I went to print from Sublime using the trusy old Ctrl-P and nothing happened. A web search later and here I am to find out why.

It is absurd that I would have to switch to a vastly inferior text editor (GEdit) having to copy and paste my content just to print.

Please add this functionality.

0 Likes

#113

Printing would be great for me too please!! Colours and Italics!!

Many thanks

0 Likes

#114

This has been brought up over and over; although Sublime doesn’t have a built in print feature, use of the ExportHTML plugin is more that a workaround and offers numerous benefits, since modern browsers have nice inbuilt print support, with zooming, export to PDF etc. etc… The other benefit to the intermediate step of having your code nicely formatted in HTML is that you can easily postprocess and format before printing if you should wish.

Given the flexibility of this solution I imagine Jon just doesn’t see the value in implementing a dedicated print feature.

As a side note, I don’t understand why so many are put out by this. I too need to print code from time to time and don’t see the above as restrictive in any way.

1 Like

#115

I see this just as qgates.
When you really need a printout? In most cases we store files to cloud or USB-stick. The last time I printed a script, that was about 10 years ago.
And consider that a text editor is no office software.

0 Likes

#116

[quote]“It’s still a low priority, at least until more people chime in saying this is something they need.”
JPS 2009[/quote]

[quote]“This has been brought up over and over.”
QGATES 2014[/quote]

[quote]“I’m guessing it’s never going to happen, regardless of customer demand. After all, there are all sorts of half-arsed, clutzy workarounds.”
ME 2015[/quote]

0 Likes

#117

6 years and still no support for printing.

How many signatures do I need on a petition to get some developer focus on it? :stuck_out_tongue:

Other than that though: Fantastic product. Best text editor out there, lots of gimmicks in there to make coding faster and make it look flashy when you are coding. Very well done!! Just need some printing so I can uninstall Notepad++ once and for all!!!

0 Likes

#118

At the risk of repetition, adding printing support isn’t trivial in Sublime, due to its platform independent nature and design choices to use homegrown libraries for most of the core. If Jon felt that this would make a real difference to sales and whatnot I’m sure it’d move up the priority pile. I get the sense that Jon’s more keen to spend his time on more ground-breaking features eg. the substantially improved regex parser for syntax coloring and ‘codesense’ capabilities.

I’ve been quoted above, but my repeated posts on this subject have also pointed out that the use of ExportHTML is straightforward, has a number of real benefits over native printing (like the ability to easily restyle/reformat your print) and few (if any) drawbacks. I do remember someone pointing out a valid drawback in the past, but it was such an edge-case that I’ve already forgotten. So apart from the idea that it’s ‘clutzy’ and extra couple of mouseclicks, can anyone point out a good reason why the ExportHTML approach is problematic?

:smile:

0 Likes

#119

This thread looks to have started in 2008. It’s now 2015. 7 (going on 8) years have past and even though it is on the “todo” list and constant requests for for us to just have a feature that comes with 99% of other editing programs, we still cannot simply print.

0 Likes

#120

Chiming in to request printing cabability. tired of copying to notepad to print.

0 Likes

#121

Just to note, Atom does not print, neither does Visual Studio Code or Adobe Brackets, Vim does not print natively, neither does Emacs. So, Sublime Text is not that unique in not supporting printing.

3 Likes

#122

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.

0 Likes

#123

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

#124

I’ve been using Sublime Text 3 for over a year, and I think it’s great. The lack of the ability to print, however, is crazy for a high-quality commercial text editor. I’d like to add a vote for “add the ability to print in the next version in Sublime Text.”

0 Likes