Sublime Forum

Ctrl-c issue

#1

Can we make it so if we ctrl-c on nothing it won’t copy nothing?
I keep accidentally overwriting the buffer with nothing :frowning:

0 Likes

Un-usual paste {CTRL + V} || paste not working as intended
#2

No, please don’t.

Sublime copies the current line if nothing is selected. Me and some of my macros rely on that.

0 Likes

#3

You can configure this, as described in [Feature request] Option to disable copy of whole

1 Like

#4

Thanks so much, that’s perfect.

0 Likes

#5

Okay, after trying about 15 permutations I give up, can someone enlighten me on how to do this in Sublime 2?

{ "keys": "ctrl+c"], "command": "copy", "context":
	
		{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }
	]
}
1 Like

#6

Your key binding will run the copy command when all selections are empty. What you want is to run no command when all selections are empty, which you can do by adding this to your user key bindings:

{ "keys": "ctrl+c"], "command": "", "context":
	
		{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }
	]
}
1 Like

#7

Thanks for the quick reply! Trying to pick up the new formatting and the logic with no documentation yet was a bit too much, that makes sense though. Appreciated!

0 Likes

#8

that solution seems obscure enough that a “user preference” might be a better solution.
“copyLineWhenNoSelection” : true or false

0 Likes