'IntelliJ Idea: How to temporarily change file type?
How to change file type of open file without binding file extension to new file type?
I'd like to use that to view python scripts that don't have any extension. So there is no extension to associate file type with.
Solution 1:[1]
Good news : IDEA now allow to temporarily set a file type : open "Actions" menu (Ctrl+Shift+A), and look for "override file type" item.
Solution 2:[2]
You should be able to just try opening the file in IntelliJ, and you will automatically be prompted to associate it with a language type.
In the case of files without an extension the association is made on the entire file name, rather than a set of extensions (no 'wildcard' character).
Take a look at how the association window automatically handles two different types of unknown files:
The 'File pattern' field is editable as well, so if your files have a common pattern to them, you can use a wildcard (*
) to quickly associate them all .
There is no way to just open a file without creating this association, otherwise IntelliJ couldn't perform any syntax highlighting or the like, but it is possible to review/remove any file associations you have created under Settings - Editor > File Types (You can quickly add new associations this way too).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mat |
Solution 2 | phaze0 |