Sublime Forum

AutoSetSyntax v2

#1

AutoSetSyntax v2 has been released.
It’s thoroughly rewritten to provide new features and utilize ST 4 APIs and Python 3.8.

If you are new, AutoSetSyntax helps you set the syntax for a view automatically in various ways:

  • Default syntax for new files.
  • Detecting the syntax when modifying the file.
  • Trimming unimportant suffixes from the filename.
  • Assigning syntax by the first line.
  • User-defined rules.

Installation

This package is available on Package Control by the name of AutoSetSyntax.

If you are already using v1 with ST 4, it will be auto upgraded to v2.
To migrate your v1 settings, check the migration guide.

Documentation

2 Likes

No File Type Options When saving
#2

Version 2.3.0

1 Like

#3

Hi Jack. I use Windows, and my nodeJS was installed through Scoop. It is in the variable PATH. For some reason, I can’t download the AutoSetSyntax: Guesslang package from the command palette.

Any suggestions?

0 Likes

#4

The server tarball is hosted on GitHub. If somehow you cannot download the server via the command palette, you can manually download https://github.com/jfcherng-sublime/ST-AutoSetSyntax/archive/refs/tags/server-0.0.1.zip and decompress it so that the file/folder structure is like

Snipaste_2021-09-17_03-02-54

1 Like

#5

Thanks for the assist. The funniest thing happened:

  1. I downloaded the Guesslang package manually and put it in AppData/Local/Sublime/Package Storage.

  2. Renamed the directory to AutoSetSytax. It didn’t work.

  3. I decided to try the command palette again. And this time, the Guesslang downloaded.

TL;DR: All I needed to do was to create a folder named AutoSetSyntax in Package Storage directory.

1 Like

#6

thanks! culprit found. will fix tomorrow!

0 Likes