Reputation: 8663
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?
Upvotes: 92
Views: 12449
Reputation: 66718
My usecase was to prevent accidental refactoring in the panel "Project" in PhpStorm, for that, enabling:
Settings > Appearance & Behavior > UI Options > Drag-n-Drop with Alt pressed only
as pointed out in this comment on a Jetbrain issue did the trick.
While not disabled entirely, there is at least a safeguard against mistakes, as the default setting allowed accidental refactoring even on right click and tiny moves with the mouse and the refactoring was hard to cancel.
Upvotes: 1
Reputation: 343
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:
Unchecking the checkbox does the trick without unwanted side effects such as also disabling the drag-and-drop operations for files etc.
Upvotes: 14
Reputation: 8663
I found it in Settings → Editor → General.
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.
Upvotes: 128