Syntax color of php file



For my python project i need to edit and change some php files.

By default, php file in pycharm don't have any color syntax so it is very unplaisant to work with.

Is there a way to activate syntax coloration of php file in pycharm (just the color, doesnt need anything else).


Comment actions Permalink


A basic syntax highlighting for PHP files is available in PyCharm via 'PHP Files (syntax highlighting only)' file type (Settings/Editor/File Types/PHP Files (syntax highlighting only)). But it's indeed very basic - just some keywords/comments highlighting.
Also I can suggest searching for existing TextMate bundles for PHP files in the web, importing them and use for the .php syntax highlighting - see and for more info.

Comment actions Permalink

Thanks for the tips.

I try to use the php textmate bundle in pycharm but it doesn't works.

I clone the git repository of the bundle on my disk with success. I can import the bundle with pycharm (File / Settings / Editor / Textmate Bundles) but it doesn't appear on the File / Settings / File Types / recognized file types. There is no new php textmate bundles to assign .php files.


Please sign in to leave a comment.