Reputation: 4170
Is it possible to disable this behaviour? It's possible in Visual Studio but I would like to change this also on ST3.
Upvotes: 4
Views: 549
Reputation: 1006
I think that the original question is not about removing the functionality of shift+delete, but only removing the copy function from it. So I'd like to post my answer here in case somebody would be looking for specifically this.
I found right_delete
, mentioned in the comments, to be rather inconvenient, because you would need your cursor to be at the beginning of the line in order to work. I found that line deletion is set to ctrl+shift+k by default (on Windows), so I just used its macro for shift+delete.
So here's the line I added to my Preferences > Key Bindings
:
{ "keys": ["shift+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
This way you don't need to worry about the position of your cursor, as long as it's within the wanted line.
Upvotes: 4
Reputation: 22791
On Windows/Linux, the Default key bindings map Shift+Delete to the cut
command:
{ "keys": ["shift+delete"], "command": "cut" },
In order to disable that behaviour, you can select Preferences > Key Bindings
from the menu, and add the following to the binding to the right hand pane:
{ "keys": ["shift+delete"], "command": "noop" },
Alternately you can replace noop
with some other command that you would rather perform in this case instead, should you want to use the key for something else.
Upvotes: 2