About this topic
Command + D to delete line in Sublime 2
Topic buzz
What others are thinking. Add to the conversation and generate some chatter.
Read later
Save this article for a later read or point of reference. +Instapaper
Sublime 2 Text editor does not have by default have a key binding to delete the current line. The alternative way is to select the entire line i.e. by Command + L and then pressing backspace. I'm so used to Command + D command to delete the current line.
The easiest way to get this done is by recording a macro with these two commands and then binding Command + D to this user defined macro. You can use the Tools menu to record a macro with the above two commands. The macros are by default stored in Packages/User/ directory. The other option is to just create a new file with the below text.
Save the file as Delete-Line.sublime-macro in /yourhomedirectory/Library/Application Support/Sublime Text 2/Packages/User/ directory.
Next step would be to bind Command + D to this macro. This can be accomplished by adding a User Key Binding. Navigate to Sublime Text 2 | Preferences | Key Bindings - User menu and add (or append if you already have any custom key bindings) the below line
This should take care of it.
Comments Section
Feel free to comment on the post but keep it clean and on topic.
blog comments powered by Disqus