The SubGrep can grep or trim lines by keyword or regular expression. The grep output still keep origin syntax for better reading.
- ctrl-shift-P brings up command dialog
- input: "install package"
Or clone/ download this source to the SublimeText package folder.
Preferences: Package Settings > SubGrep > Key Bindings – User
:
{
"keys": ["shift+ctrl+g"],
"command": "sub_grep"
}
Add this hot-key for triming feature:
{
"keys": ["shift+ctrl+h"],
"command": "sub_grep_trim"
}
- Grep lines containing current selected text
- Grep lines containing text in sublime's "find input-bar"
- Grep lines matches regular expression in sublime's "find input-bar"
- Trim lines containing selected text
- Trim lines
- Select "hello" and press "ctrl-shift-g"
- Press "ctrl-f", input text "hello" in find input-bar and press "ctrl-shift-g"
- Press "ctrl-f", input regular express "hello.*" in find input-bar and press "ctrl-shift-g"