Sublime 3: Ctrl-c triggers, even if no text is selected, deletes the text on the clipboard

I am using Sublime 3083 .

Suppose I cut out some text in a file ( Ctrl-x ), and then tried to paste it to another location in the same file or another.

  • I place the cursor on the line I want to insert text.

  • If I pressed Ctrl-v , the text will be pasted without any problems.

  • But if I accidentally hit Ctrl-c , the text that was cut out can no longer be pasted. It is removed from the clipboard, and I am forced Ctrl-z to return to the point before the text is cut.

This happens even if no text is selected when you press Ctrl-c .

I tested, and this behavior seems exceptional from Sublime . Is this a feature? If so, is it possible to disable it?

+7
sublimetext sublimetext3
source share
2 answers

In Preferences > Settings - Default there is a parameter that can change the behavior:

 // If true, the copy and cut commands will operate on the current line // when the selection is empty, rather than doing nothing. "copy_with_empty_selection": false, 

Changing it to false should make it not copy an empty selection.

+13
source share

Add this to your user preferences:

 "copy_with_empty_selection": false 

Step by step:

  • Preferences > Settings
  • A new window will open with two files:

enter image description here

  1. In sublime-settings -- User (the one on the right) insert this:

    "copy_with_empty_selection": false

Why?

If you do this in the default settings, it will be overwritten with high updates. Any changes made to the settings should be in the user settings.

+4
source share

All Articles