Set print margins in Textmate?

0

I'm using OS X 10.8.5 with TextMate 2.0-beta.6. I want to print a text document, but it appears there are no margins (or the margins are too small for my taste):

Textmate default margins

I visited Textmate's Page Setup, but it does not appear to provide settings related to the margins:

Textmate page setup

How do I set the print margins to 0.5-inch or 1-inch?

jww

Posted 2014-11-11T20:46:34.603

Reputation: 1

Answers

1

Reference 18 Printing would suggest it can't be done...

To the amusement of some and the frustration of others, TextMate currently features only limited printing capabilities.

That means you can only use the document font with no syntax highlighting and no options except the standard printing options plus header and footer fields as shown below.

However, it can be done when printing to PDF.

TextMate Tricks: An Automation to Produce PDFs

I made it possible to configure things like margins and fonts for the PDF with a YAML file. It doesn’t exist yet and the code will run fine without it, but let’s add one more shortcut for that. This time, we don’t need any code and we can just build a snippet. A snippet is a chunk of boilerplate code we can customize to our needs.

Click on that plus in the lower left of the Bundle Editor one more time and choose New Snippet this time. Give it a name like Configure PDF Builder and replace the examples with this code:

# Set margins below. These are in PDF points (72 per inch).
top_margin: ${1:72}
left_margin: ${2:72}
right_margin: ${3:72}
bottom_margin: ${4:72}
# Set font, size, and line spacing below.
font: ${5:Courier}
font_size: ${6:10}
spacing: ${7:15}

Read the complete article for full instructions.

DavidPostill

Posted 2014-11-11T20:46:34.603

Reputation: 118 938

Amazing a commercial editor can't print properly... And its not limited to TextMate - TextWrangler appears to suffer the same fate. I really amazed..... – jww – 2014-11-11T21:18:34.633