How to disable auto-detecting scratch file type when text is highlighted?

Normally when I click "File -> New Scratch File" I'm presented with a menu where I can pick the language I want. If I have some text highlighted and click "File -> New Scratch File" instead of asking me the language, it detects the language of the highlighted text and gives me a scratch file for that language.

Can this be turned off? I always want to get the menu to pick a language whether or not I have text highlighted.

1

I was not able to find a way to disable this feature. However, I have noticed that it does not behave like this when you create a new scratch file from the Project Tool window by right-clicking on the "Scratches & Consoles" and choosing "New Scratch file" from that menu.

Does it work the same for you? 

0

No, I am seeing the same behavior for both. And in both menus, it shows the same keyboard shortcut (Ctrl+Alt+Shift+Insert)

0

Hm, it might be something OS-specific then? Basically, I have Windows 10 installation and it works as I described above but I guess it could be a bug.

By the way, I have managed to find a similar request on YouTrack and it seems to be, there is no way to avoid this behaviour now:

https://youtrack.jetbrains.com/issue/IDEA-145278

0
Avatar
Permanently deleted user

I'm facing the same behaviour, and I couldn't find any setting to disabled it. To avoid letting the IDE decide the type of the scratch what I do is highlight the text I want, copy it, unselect with left or right arrow, then I can use the shortcut Ctrl+Alt+Shift+Insert select the type I want and then paste the text.  Not ideal but this workaround works for me. 

0

请先登录再写评论。