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. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *