# Sublime Text with 80 and 120 column rulers

For many programming languages we still like to use either 80 or 120 columns in our editors to ensure it fits easily on print, as well as to use it as an aid for ensuring concise code.

In Sublime Text you can set vertical rulers for this by going to Preferences » User File Preferences and add rulers 80 120 and save the file.

For Sublime Text 2 it’s under Preferences » Settings — User, but the configuration file is now in JSON format, so you need to add "rulers": [80, 120] and maybe you need to append a comma at the end if you have more configuration directives following it.

Addition 2013: in Sublime Text 3 it is still under Preferences » Settings — User and the file is still in JSON, so simply add "rulers": [80, 120], like in the example for Sublime Text 2.

## 5 thoughts on “Sublime Text with 80 and 120 column rulers”

1. Matt S says:

Excellent! Exactly the setting I was looking for.

2. Ah, thanks. This is perfect. It’s ridiculous how easy this is in Sublime. Thanks for the tip!

3. Thanks, I was wondering where could I find that option.

4. Is there a way that you can specify different margin positions for different types of files? eg 80 character margin for Python files, 120 character margin for HTML files?

5. Yes, you actually can!

Open a file of the filetype you want to set a ruler for. Then Preferences » Settings – More » Syntax Specific – User and follow the directions above for adding a ruler. The easiest might be to copy-paste the User Preferences content and strip it down to what you want/need for that filetype.