Last Updated: February 25, 2016
·
10.81K
· joshuacc

Use rulers in Sublime Text 2 to conform to coding standards

This will make it easier to conform with your style guides and coding standards by giving you a nice visual reminder of when you are approaching your line length limit.

Picture

First, in your Preferences.sublime-settings file add the following setting:

/*
Places a vertical line after character 80.
You should use whatever value you tend to use as your length limit most frequently
*/
"rulers": [80]

Then, for each language/syntax that you have a different line length limit, modify the syntax-specific settings. For instance, in my HTML (Twig).sublime-settings I have:

"rulers": [100]

1 Response
Add your response

Great tip; how would you add on-demand rulers to the View > Ruler > ... submenu, to add to the predefined ones?

over 1 year ago ·