简体   繁体   中英

Save in Sublime Text with Another Extension

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?

you can set the syntax manually as follows. 设置语法

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM