Introduction¶
AutoSetSyntax v2 utilizes ST 4 plugin APIs along with Python 3.8.
Overview¶
AutoSetSyntax helps you set the syntax for a view automatically in various ways:
- Default syntax for new files and build outputs.
- Detecting the syntax when modifying the file.
- Trimming unimportant suffixes from the filename.
- Assigning syntax for Sublime Text syntax test files.
- Assigning syntax by the first line.
- User-defined rules.
- (Experimental) Deep learning based syntax detection. (Magika)
If you want to learn more details, read "Use Cases" and "Configurations".
Installation¶
This package is available on Package Control by the name of AutoSetSyntax.
Best Practice
It's strongly recommended to install LSP and LSP-json to have a better experience for editing settings. At least, it will provide autocompletion and verification for settings of this plugin.
Acknowledgment¶
- Plugin's original idea comes from "Automatically set view syntax according to first line".
- ApplySyntax, which AutoSetSyntax v2 is inspired by.
License¶
Quote
MIT License
Copyright © 2017-2024 Jack Cherng jfcherng@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.