By josh / May 15, 2014

Prevent copy-and-paste rage with this quick Sublime Text tweak

Tell me if this has ever happened to you.

You go to copy a block of code. It’s a big block–a couple hundred lines, maybe. Enough that getting just what you wanted is a bit of a pain, involving much clicking and dragging. Whew, got it.


You tab over to the destination file, find just the right place … There.


Dang. Meant to paste …


AARRRRRRGGGGG!!! The selection is gone. Your errant Ctrl-C overwrote your carefully selected lines of code with a whole lotta nothing.

Whose bright idea was it to make the keyboard shortcut for “copy” so close to the shortcut for “paste”?

To make sure this never happens to you again, add this to your user preferences:

"copy_with_empty_selection": false

P.S. Find this helpful? As my three-year-old would say, there’s “yots and yots” more in the free Sublime Text Tips newsletter. Check it out here:

About the author


Micha - June 6, 2014

Oh, nice one! Thanks!

As an alternative, you could also mention the Strg+K, Strg+V trick! 🙂


Rachid804 - December 6, 2015

I never thought this can be disabled from th settings.
Thank for pointing this out.

Click here to add a comment

Leave a comment: