Vim-like modelines for Sublime Text.
- Total 861
- Win 218
- Mac 388
- Linux 255
|May 29||May 28||May 27||May 26||May 25||May 24||May 23||May 22||May 21||May 20||May 19||May 18||May 17||May 16||May 15||May 14||May 13||May 12||May 11||May 10||May 9||May 8||May 7||May 6||May 5||May 4||May 3||May 2||May 1||Apr 30||Apr 29||Apr 28||Apr 27||Apr 26||Apr 25||Apr 24||Apr 23||Apr 22||Apr 21||Apr 20||Apr 19||Apr 18||Apr 17||Apr 16||Apr 15|
Set settings local to a single buffer. A more granular approach to settings than the per file type .sublime-settings files.
Inspired in Vim's modelines feature.
Download and install SublimeModelines.
See the installation instructions for .sublime-packages.
Buffers will be scanned .on_load() for modelines and settings will be set accordingly. Settings will apply only to the buffer declaring them.
How to Declare Modelines
Modelines must be declared at the top or the bottom of source code files with one of the following syntaxes:
# sublime: option_name value # sublime: option_name value; another_option value; third_option value
Note: # is the default comment character. Use the corresponding single-line comment character for your language. When there isn't a concept of comment, the default comment character must be used.
How to Define Comment Characters in Sublime Text
SublimeModelines finds the appropriate single-line comment character by inspecting the shellVariables preference, which must be defined in a .tmPreferences file. To see an example of how this is done, open Packages/Python/Miscellaneous.tmPreferences.
Many packages giving support for programming languages already include this, but you might need to create a .tmPreferences file for the language you're working with if you want SublimeModelines to be available.
If the option's value contains a semicolon (;), make sure it isn't followed by a blank space. Otherwise it will be interpreted as a multioption separator.
For some common cases, no directly settable option exists (for example, a setting to specify a syntax). For such cases, Sublime Modelines provides non-standard accessors as a stop-gap solution.
Sets the syntax to the specified .tmLanguage file.