by 4/12/2007 01:43:00 PM 2 comments

Delete Line Macro in TextMate

TextMate is a great text editor. One key command that I really miss in it is a 'Delete Line' command. It's pretty simple to implement though. Here's how:
  1. Under the Bundles menu select Macros->Start recording
  2. Select a line in an editor window([Option]+[Shift]+L)
  3. Delete the line ([Backspace])
  4. Under the Bundles menu select Macros->Stop recording
  5. Under the Bundles menu select Macros->Save last recording
  6. Give it a name; 'Delete Line' seems most appropriate
  7. Assign it a keystroke. I use [Option]+D.

Brian Schlining


Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.


Brett said...

Try ctrl-shift-K, just for fun ;).

Hohonuuli said...

Try ctrl-shift-K, just for fun ;)

Thanks Brett. At first, I tried your command and nothing happened; I figured you were messing with me ;-) But I figured out what was going on. I've actually been using TextMate since the day it was first released. It didn't use to have a 'Delete Line' command, so I had to roll my own quite a while back. Unfortunatly, I saved my Macro into the Text.bundle which has subsequently overridden the new versions containing the [ctrl]+[shift]+k. Deleting ~/Library/Application Support/TextMate/Bundles/Text.bundle fixed the problem and, voila, the TextMate's default 'Delete Line' command reappeared.

Anyway, thanks for pointing that out.