Opening extension-less files


I would like to open extension-less files in PHPStorm in simple text mode but I cannot find a way to do that without getting the error message saying that file type cannot be opened.
I looked into the File Types section of the preferences but if the solution was in there, it wasn't obvious to me.

Thanks for your help!


Hi there,

Simply speaking: you cannot do this in "one and for all" fashion (so ALL extension-less files are treated the same way automatically).

You have to somehow associate file name to file type. Since file is extensions-less, the pattern must include whole file name (or some common part of it). So .. just associate full file name with "Text files" entry in "Settings | File Types" (e.g. "README", "LICENSE", "NOTES", "INSTALL" -- some common extension-less file names from few libraries; this still would allow to link files like "readme.php", "license.html", "notes.tpl" etc with their assigned file types).



Thanks for your reply. I was hoping there was a better way to do this but I guess that will have to do.


I don't like having extensions if I don't need them. In VIM I can just set the filetype and it will remember it.

I have a node js script called 'foo' (no .js extension).
I would like to associate this file as javascript without adding .js to it.

edit: I just realized I can right-click on an extension-less file and associate that file.


Please sign in to leave a comment.