You need to open (or set syntax to) a file with syntax you want. This case py.Then you go to preferences->File settings - more -> syntax specific - user.You add there whatever you want to and you are set.