Sublime Forum

Find and remove lives

#1

I want to find all lines with ‘#’ and remove them using Sublime Text 2 (running on Windows 7). How can I do this?

0 Likes

#2

Sublime is not yet able to take lives

0 Likes

#3

Figured this out. The trick is to use regular expressions with Find and Replace.

0 Likes

#4

As a non-regex alternative, you could also do a normal search, hit “Find All” (Alt+Enter), and then click Selection->Expand Selection to Line (Ctrl+L). Now any line with a # will be selected and you can just press Delete.

0 Likes

#5

I didn’t get this until reading the page like… 5 times. lol.

Also just to throw in another way, which also utilise multiple cursor similar to what estmatic suggested: Simply do the alt+f3 thing (if your target looks less like a ‘word’, eg the ‘#’, you may have to select it first before hitting alt+f3), and then ctrl+shift+k to delete those lines.

0 Likes

#6

[quote=“angusyeh”]

I didn’t get this until reading the page like… 5 times. lol.[/quote]

yet. Version 4?

0 Likes