Is there a way to tell sublime text 2 to display a column 78 ruler in python and javascript and no ruler in HTML, by default?
You can manually change file type editing preferences using the SUBLIME-OPTIONS file. There is a User File Type. sublime-options file and a Default File Type. sublime-options file, which are both located in the Packages/Default directory.
Yes! For both a Python and a Javascript file, open it (or just set the syntax for an empty file to Python
or Javascript
), then click Preferences -> Settings – More -> Syntax Specific – User
. Edit that settings file like you would your regular user settings file. Once you're finished, it will look something like this:
{
"rulers": [
78
]
}
Do the same for HTML, but make the "rulers"
array empty, i.e.:
{
"rulers": [ ]
}
Subsequently, Javascript and Python files will have a ruler at line 78, whereas HTML will display no rulers. Any settings that you can define in your user settings file can be made specific to a syntax.
Close the file and re-open it if it doesn't take effect. Had to do this with my .py files. Applies for Sublime 3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With