Adding keywords to default filetypes possible?

I'd like to add some of my own keywords to the existing .py file type, so they can be used for syntax highlighting.

(In particular my own debug logging method, so it will stand out.)

I can't think of a way to find how to do this.

The default file type cannot be editted, and adding my own filetype and associate it with *.py is not possible either.

Is it possible? How?

Any help would be appreciated.

1 comment
Comment actions Permalink

This is only possible by writing a plugin for PyCharm that would implement additional syntax highlighting. PyCharm's built-in syntax highlighting highlights actual Python keywords, and your method is not one of those.


Please sign in to leave a comment.