Home Download Buy Blog Forum Support

Print Margin?

Print Margin?

Postby Kabal458 on Sat Jan 29, 2011 10:02 pm

Hey Guys,
Can't seem to find any documentation about it but is there a preference I can set to show the print margin?

Cheers!
Kabal458
 
Posts: 4
Joined: Sat Jan 29, 2011 10:00 pm

Re: Print Margin?

Postby jps on Sun Jan 30, 2011 9:00 am

Could you explain what you mean by a print margin?
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Print Margin?

Postby Kabal458 on Sun Jan 30, 2011 9:44 am

Its a relic from old days. Printers could only print 80 characters on a single line so text editors would draw a vertical line down the right side of a text area after where the 80th character would be.

Today however this is still used as a "general guideline" for writing code to prevent lines from getting too long. Also many UNIX terminals typically only show 80 columns so this guideline helps prevent ugly word wrapping.

As an example Eclipse has this feature, you can enable it by selecting General > Editors > Text Editors from the preferences window and checking "Show print margin". I've attached a photo of what it looks like.
Attachments
aptana.png
aptana.png (203.41 KiB) Viewed 7328 times
Kabal458
 
Posts: 4
Joined: Sat Jan 29, 2011 10:00 pm

Re: Print Margin?

Postby jps on Sun Jan 30, 2011 9:49 am

You can use the "rulers" setting to do this, e.g., make your User File Preferences:

Code: Select all
{
    "rulers": [80]
}
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Print Margin?

Postby Kabal458 on Sun Jan 30, 2011 9:55 am

oh awesome! thank you very much!
Kabal458
 
Posts: 4
Joined: Sat Jan 29, 2011 10:00 pm

Re: Print Margin?

Postby thekyz on Fri Feb 04, 2011 9:29 am

Any idea why this wouldn't work for me ?

I only have this in the user pref file:

Code: Select all
# Settings in here override those this Default File Type.sublime-options, and
# are overridden in turn by file type specific options.
# This is a good place to put your own settings and not have them overwritten
# when upgrading.

{
"rulers": [100]
}
thekyz
 
Posts: 20
Joined: Fri Feb 04, 2011 9:27 am

Re: Print Margin?

Postby adzenith on Fri Feb 04, 2011 5:52 pm

thekyz wrote:Any idea why this wouldn't work for me ?

I only have this in the user pref file:

Code: Select all
# Settings in here override those this Default File Type.sublime-options, and
# are overridden in turn by file type specific options.
# This is a good place to put your own settings and not have them overwritten
# when upgrading.

{
"rulers": [100]
}

It looks (from the hash marks at the beginnings of the comment lines) like you're running ST1.x, not ST2. If this is the case, then I think you need to take out the curly braces and change your rulers line to:
Code: Select all
rulers 100
adzenith
 
Posts: 1216
Joined: Mon Oct 19, 2009 9:12 pm

Re: Print Margin?

Postby thekyz on Mon Feb 07, 2011 2:00 pm

Yes my bad ...

I switched to st2 and it works fine now ^^

Thx
thekyz
 
Posts: 20
Joined: Fri Feb 04, 2011 9:27 am


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 35 guests