Sublime Forum

File Type / Color

#1

Sorry I am new to Sublime
When I create a new file using the SideBarEnhancement and start typing my Syntax/Code does not become color. I have to go in the folder and change the file to .py then it becomes color but then when I do Ctrl + B on a mac it give me an error. The files with the Python icons are fine but the others with the snowflakes are only white and no color. So it defeats the purpose of the theme. See image below.

ERROR MESSAGE when I try to run the file when I name it .py
[Errno 2] No such file or directory: ‘/usr/local/bin/python3.5’
[cmd: [’/usr/local/bin/python3.5’, ‘-u’, ‘/Users/rohanrob/Desktop/Giraffe/variable.py’]]
[dir: /Users/rohan/Desktop/Giraffe]
[path: /Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin:/Applications/Wireshark.app/Contents/MacOS]

https://imgur.com/a/vPOo3WP

0 Likes

#2

in the picture, you are building the different file, it’s just syntax error. whenever you create file, you have to save it as .py otherwise the Sublime will not know what syntax you are using.

2 Likes

#3

Thank you for your reply. So when I do a new file and it come at the bottom to name it I just need to put .py on it and it will save as one or two files?

0 Likes

#4

It will save as one, also I believe if you have syntax set as python, and you don’t specify the .py extension it should automatically save it as a python file.

2 Likes

#5

Thanks I think I got it now

0 Likes