Docker.tmbundle
Docker.tmbundle copied to clipboard
Feature Request: Recognize Dockerfile.*
It was noticed that Github gives files named like Dockerfile.*
no syntax highlighting; however, this appears to be a fairly common naming convention for Dockerfiles and is also referenced in the Docker documentation (https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f). My impression is that this is the project that provides Github with its Dockerfile syntax highlighting, but please correct me if I'm wrong. The VS Code Docker syntax highlighter had a similar feature request some time ago where they decided to recognize Dockerfile.*
: https://github.com/microsoft/vscode-docker/issues/1907. Could we get that same filename convention matching support here as well?
Thanks!
similar to #31
My recommendation is to use https://packagecontrol.io/packages/ApplySyntax.
My setting is like
{
//...
"syntaxes": [
{
"syntax": "Dockerfile Syntax Highlighting/Syntaxes/Dockerfile-bash",
"rules": [
{ "file_path": ".*(?:\\\\|/)Dockerfile(\\.\\w+)*$" }
]
},
//...
]
}
If someone figured out a way to do this in Sublime syntax, or ST eventually added the feature, a PR is very welcome!