I want to find all lines with ‘#’ and remove them using Sublime Text 2 (running on Windows 7). How can I do this?
Find and remove lives
Figured this out. The trick is to use regular expressions with Find and Replace.
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.
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.
[quote=“angusyeh”]
I didn’t get this until reading the page like… 5 times. lol.[/quote]
… yet. Version 4?