Is it possible to create a new file with a certain name with hotkeys in IntelliJ IDEA?
Answered
Often create new files with a specific format, so customize the file template, new when you need to Alt + Insert and then select the corresponding template.
However, I feel that this operation is still too cumbersome and would like to implement.
-
directly use shortcut keys to perform this operation, instead of opening the New menu first, and then select
-
In most cases, the name of the file is also fixed, so the default behavior should be directly use the fixed name.
After searching on Google, I didn't find a solution that satisfied me.
Is this a good feature to implement in IDEA? Do I have to write extensions or scripts?
Please sign in to leave a comment.
You can add variable to the filename [1], so the name would be dynamic based on the inserted text [3]:
You can use macros for that: https://www.jetbrains.com/help/idea/using-macros-in-the-editor.html