Home Download Buy Blog Forum Support

Ctrl+C with nothing selected

Ctrl+C with nothing selected

Postby Clueless on Tue Dec 01, 2009 12:57 am

Ctrl+C when there is no text selected copies an entire line. This always surprises me when it happens, and it happens a lot since I am the type of person who can't manage to hit Ctrl+V to paste reliably.

When the text I have on the clipboard is from a cut command within the same document (usually the case) I have to hit Ctrl+Z a few times to undo the cut, hit Ctrl+X to cut again, and then find the old place and paste correctly this time.

When the text is from another program or tab within sublime text, I have to switch over to it, find a way to get the same selection, and then copy it over to the place I want to paste.

Both of these are time-consuming and break up my workflow. Most other text editors simply ignore Ctrl+C when there is no selection, which is great because I can just correct my keystroke and I am off again. Perhaps this is already implemented as an option, in which case this is simply a +1 vote for making that the default (I would love to know how to do this though, since I can't figure it out). Otherwise, I think Sublime Text should definitely implement this.
Clueless
 
Posts: 2
Joined: Tue Dec 01, 2009 12:48 am

Re: Ctrl+C with nothing selected

Postby mry on Tue Dec 01, 2009 5:47 am

Hi,

This should do it - I'm not sure if it's the best way to this but it works. Add the following lines to your "User Key Bindings" file (this can be found in the Preferences menu). Now you should have ctrl+c and ctrl+x disabled when you don't have any text selected.

Code: Select all
    <binding key="ctrl+c" command=""><context name="allSelectionsEmpty" value="true"/></binding>
    <binding key="ctrl+x" command=""><context name="allSelectionsEmpty" value="true"/></binding>
mry
 
Posts: 10
Joined: Fri Oct 30, 2009 5:42 am

Re: Ctrl+C with nothing selected

Postby vim on Tue Dec 01, 2009 9:49 am

search the forum, it was already discussed few times, as far as i can recall.
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm

Re: Ctrl+C with nothing selected

Postby Clueless on Tue Dec 01, 2009 9:15 pm

Ahh, thanks guys, guess I must have missed it.
Clueless
 
Posts: 2
Joined: Tue Dec 01, 2009 12:48 am


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests