Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop PHPStorm from cutting/copying the entire line if nothing is selected

If I set the caret on a line and accidentally press CtrlX or CtrlC instead of CtrlS, then the entire line is cut/copied, since there is no selection.

This can be very annoying, and can often times destroy code in the clipboard which I wanted to paste. I'd expect nothing to happen if nothing is selected. How can this be turned off?

like image 644
SeinopSys Avatar asked Dec 29 '14 23:12

SeinopSys


People also ask

What does cut do in IntelliJ?

Cut line or selection Set the caret anywhere in the line to cut the whole line, or select a block that you want to cut. Press Ctrl+X or choose Edit | Cut from the main menu .

How do I copy a whole line in IntelliJ?

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.

How do I select a line in IntelliJ?

Ctrl+Shift+Left, Ctrl+Shift+Right.

How do I copy and paste?

To copy and paste, you can use keyboard shortcuts: PC: Ctrl + c for Copy, Ctrl + x for Cut, and Ctrl + v for Paste. Mac: ⌘ + c for Copy, ⌘ + x for Cut, and ⌘ + v for Paste.


1 Answers

  1. Go to Registry screen: Help | Find Action... and search for registry there

  2. Once there -- find and activate editor.skip.copy.and.cut.for.empty.selection entry.

enter image description here

like image 51
LazyOne Avatar answered Oct 27 '22 05:10

LazyOne