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?
-
24Very annoying feature for me too.– humkinsFeb 29, 2016 at 9:59
-
2@gumkins Yeah, wow was that an annoying feature for so many years.– DetNov 5, 2019 at 20:55
-
5IntelliJ editor has 10,000 features I love and use and forget everyday. This is one of the 10 I hate and remember. #CodeParkourFeatures– Bob SteinAug 23, 2020 at 11:57
-
1Confirmed, dumb feature.– Base DesireJan 8, 2021 at 15:31
3 Answers
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.
-
4While that option will prevent text drag&drop, it does not disable DnD in the file list. :(– SephieOct 9, 2014 at 12:27
-
1Yup, that's right, it doesn't change the file list. The issue I was having was just with text so that fixed it. Are you trying to disable file drag and drop as well?– Jason DOct 9, 2014 at 13:18
-
1Yeah, I often get the move confirmation dialog when I meant to click a file or dir.– SephieOct 9, 2014 at 15:56
-
47File list drag-n-drop can be disabled by going to Appearance & Behavior - Appearance, check "Drag-n-drop with ALT pressed only". Or just search by 'drag' word. Apr 18, 2016 at 5:50
-
1Great! I think the Intellij change something recently, it became very easy to drag, disable it resolve the problem– Xin MengSep 18, 2019 at 5:57
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.
-
1it does not disable drag'n'drop in project area. PS. Appearance & Behavior - Appearance, check "Drag-n-drop with ALT pressed only" Mar 23, 2021 at 9:09
-
1@SimonLogic The OP's question does not pertain the dragging and dropping files and folders in the Project pane. It is about cutting and pasting of the code in the editor via drag and drop.– ClokmanJan 21 at 4:34
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...