textmatetextmatebundles

TextMate find text and then delete entire line?


I'll show you what I want to do using a textmate command or bundle:

Lets say we have the following document:

foo  
diddy
  bah
foo
foobah
diddy

I want to find and delete all the lines matching bah, the desired ouput in this case would be:

foo
diddy
foo
diddy

Thanks!


Solution

  • With the document you want to filter open,

    That's it.


    Here's a more automated way to do the same thing:

    [Note: i inserted spaces between the regexp tokens in both examples because for some reason the asterisks '' were not rendering in HTML page]