Disable click and drag cut and paste in IntelliJ Idea IDE

Intellij IdeaDrag and-DropEditorSettings

Intellij Idea Problem Overview


In my IntelliJ Idea 13.1.2 IDE I keep running into situations where I'm selecting on a click and drag via my laptop touch pad. I keep accidentally clicking and dragging text and cutting lines. I've searched the options and settings panels for the words click and drag but I don't see a way to turn this feature off. IntelliJ's help talks about how to use click and drag cutting but doesn't say how to disable it. Does anyone know how to disable cut and paste through click and drag in the IntelliJ IDE?

Intellij Idea Solutions


Solution 1 - Intellij Idea

I found it in SettingsEditorGeneral.

Under the Mouse heading. The option is called "Enable Drag'n'Drop functionality in editor".

This also seems to disable drag and drop moving of files though.

Solution 2 - Intellij Idea

In WebStorm 2020.1 (and presumably in other Jetbrains IDEs), the related option 'Move code fragments with drag-and-drop' is in Preferences > Editor > General:

enter image description here

Unchecking the checkbox does the trick without unwanted side effects such as also disabling the drag-and-drop operations for files etc.

Solution 3 - Intellij Idea

There is no way to disable Drag-n-drop highlighted text in the editor itself!!! ALT guard for drag-n-drop files is a good idea as I accidentally drag and drop files on daily basis. Kudos for discovering that I just enabled it.

I have contacted Intellij support to give us a setting that we can disable in editor drag and drop. I think that is a stupid feature in the first place...

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJason DView Question on Stackoverflow
Solution 1 - Intellij IdeaJason DView Answer on Stackoverflow
Solution 2 - Intellij IdeaClokmanView Answer on Stackoverflow
Solution 3 - Intellij IdeaJuha VehniaView Answer on Stackoverflow