webstorm: change file type for files without extension
Hi, I have a file named "control". No extension. And I can't add extension, sorry.
This file is a php-script starting with
#!/usr/bin/env php
<?php
How can I change the file type association with this particular one file to enable php syntax highlight ?
Thank you,
Dima
Please sign in to leave a comment.
Hi there,
It works just fine in PhpStorm -- no extra steps are needed.
WebStorm has no PHP support.
Just add `control` to Registered Patterns of the desired file type:
As @Andriy mentioned, WebStorm provides no PHP support. But a basic syntax highlighting for PHP files is available in WebStorm via PHP Files (syntax highlighting only) file type (Settings | Editor | File Types | PHP Files (syntax highlighting only)). It's indeed very basic though - just some keywords/comments highlighting. You can edit this custom type definition, or try this one, for example: https://github.com/a2net/WebStorm-php-Syntax-Highlight-with-WordPress-functions.
@Andriy: there is no sense to list what products support php because I'm interested in WebStorm and the question goes to WebStorm and it's not about PHP language, PHP is just an example of "file type" which WebStorm "knows" about.
@Elena: thank you for giving me idea how to enable highlight for some file !