RememberSyntax
Remember manually selected syntax for files in Sublime Text
By
Suor
Created
Installations minus removals
Upgrades
- 18 installs
- 3 stars
Links
Versions
1.0.1
·
More
-
(*)
1.0.0
·
2026-04-22 10:12
RememberSyntax
Remember syntax selected for a file in Sublime Text and restore it when the file is opened again.
This is useful for files with generic names or no extensions, where automatic syntax detection either picks wrong syntax or gives up.
You can also define filename rules in RememberSyntax.sublime-settings:
{
"rules": [
{"pattern": ".aliases", "syntax": "Packages/ShellScript/Bash.sublime-syntax"},
{"pattern": "service.*", "syntax": "Packages/INI/INI.sublime-syntax"},
{"pattern": "Dockerfile.*", "syntax": "Packages/Dockerfile Syntax Highlighting/Dockerfile.sublime-syntax"}
]
}
Rules match against basename only and use Python fnmatch glob syntax.
When you manually change syntax for an opened file, the plugin saves that choice
under saved in its settings and uses it next time. Per-file saved syntax wins
over pattern rules.