-wcakq
Last Updated: February 25, 2016
·
10.07K
· joshuacc
76f885c3945aa47590c9b2fa8366c53d

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]
Say Thanks
Respond

1 Response
Add your response

21472
A0235bc63a665cf3c08e0ed61e9572ba

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

over 1 year ago ·