Sublime Forum

Can I bind Command-D to "Delete Line"?

#1

I’m a little shaky with Sublime Text 2, but I read the commands page (sublimetext.com/docs/commands) and didn’t see anything that looked like “delete line”. I’m also not really clear on how to edit my key bindings - the docs talk about XML in one place, and JSON in another, and the file opened in the Preferences>Key Bindings-User just has a couple of square brackets (like so: ]).

I’m a registered user, and I wouldn’t mind getting a pointer on this. Thanks.

0 Likes

#2

Delete line: Ctrl+Shift+K
Delete to end of line: Ctrl+K

If you’ve seen documentation talking about XML files, then that is for Sublime Text 1 and not relevant anymore.
To see what the standard key bindings are, you need to look at Preferences / Key Bindings - Default. And Any changes you want to make should then go into Key Bindings - User.

0 Likes

#3

On linux:

[
	{ "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} }
]

Just search for your default “ctrl+shift+k” command key, and copy it into the user bindings

0 Likes