I have recently started using Intellij and I noticed that by default, when you do ctrl+c for copying something when you have nothing selected, it copies the entire line into the clipboard overriding what I had in there before.
This is really annoying yet I cannot seem to figure out how to disable it. I am aware that there is a paste history you can use however this is not what I am after, I just want to disable it like you can do with sublime text.
Is there a way to disable this behaviour so that when I press ctrl+c and nothing is selected it just leaves the clipboard alone?
Duplicate the current line or selectionPress Ctrl+D or choose Edit | Duplicate Line or Selection from the main menu . Alternatively, you can press Ctrl+Shift+A , start typing the command name in the popup, and then choose it there.
Set the caret anywhere in the line to copy the whole line, or make a selection to copy. Press Ctrl+C or choose Edit | Copy from the main menu .
Press Alt + Home to activate the navigation bar, then either press F5 , or press Ctrl + C to copy the file and then press Ctrl + V to paste it, a dialog will appear to name your new file.
Since version 2021.2 there is a dedicated Don't copy/cut the current line when invoking the Copy or Cut action with no selection
setting for this in Preferences | Advanced Settings
.
For older IntelliJ Platform based IDE's the setting is more hidden:
Invoke Help | Find Action...
(Ctrl (Cmd on Mac)+Shift+A), type Registry and select the Registry...
item that appears. Enable the editor.skip.copy.and.cut.for.empty.selection
option there. Be careful with the other configuration options, because it is possible to break your IntelliJ IDEA installation with an incorrect setting.
In Mac OS X:
registry
and press return to open the Registry.editor.skip.copy.and.cut.for.empty.selection
option.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With