Sublime Forum

Print Margin?

#1

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!

0 Likes

#2

Could you explain what you mean by a print margin?

0 Likes

#3

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.


0 Likes

#4

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

{
    "rulers": [80]
}
0 Likes

#5

oh awesome! thank you very much!

0 Likes

#6

Any idea why this wouldn’t work for me ?

I only have this in the user pref file:

[code]# 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]
} [/code]

0 Likes

#7

[quote=“thekyz”]Any idea why this wouldn’t work for me ?

I only have this in the user pref file:

[code]# 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]
} [/code][/quote]

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:

rulers 100
0 Likes

#8

Yes my bad …

I switched to st2 and it works fine now ^^

Thx

0 Likes