Quickly find all lines matching a string or regular expression in Sublime Text.
How to Filter
On the Edit > Line menu:
- Include Lines With Regex ⌘+K ⌘+R
- Include Lines With String ⌘+K ⌘+S
- Exclude Lines With Regex
- Exclude Lines With String
On the Edit > Code Folding menu:
- Fold Excluding Regex
- Fold Excluding String
- Fold With Regex
- Fold With String
On Windows and Linux, use ctrl instead of ⌘.
How to Install
Install with Package Control
- Install Sublime Package Control
- Open the command pallette ⌘+shift+P
- Select Install Package
- Select Filter Lines
Install with Git
- Open the Sublime Text package folder (see Sublime Text > Preferences > Browse Packages...)
- Clone this repo
- Restart Sublime Text
Filter Lines is based on a Sublime Text plugin tutorial by Daniel Beck. If you want to write a plugin, Daniel's tutorial is a good place to start.