Question

In Sublime Text 2 & 3, whenever I save a file with one extension, or without an extension, then save it with another extension later, the syntax colors seem to stay with the first extension. For example, when I save what I mean to be a JavaScript or PHP file without an extension by accident, then Save As with the correct extension, the text stays all black.

Is this supposed to happen? Is it because the file isn't actually saved as the 2nd extension the next time? Most importantly, is there a way to save the file with the correct extension without creating a new file & copying all the text over?

Was it helpful?

Solution

you can set the syntax manually as follows.set syntax

click HTML and you will see all the syntaxes, you may choose whatever you want, or you can do it in the command palette by type ctrl+shify+P and type syntax and you can do the same thing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top