Filter line for current opening file by strings/regular expressions, generating the result in a new file.
- Filter line by input string (or not contain input string).
- Filter line by input regular expression (or not match input regular expression).
- Filter line by config file
filterline.json
(orfilterline.eoml
) in corresponding.vscode
directory.
- Marketplace
- Search
Filter Line
in vscode extensions.
- Open command palette (⇧⌘p) and type
filterline
, selectFilter Line By Input String
in the list. - Type a string and hit
<Enter>
. - The extension will output matching lines in a new file with postfix
.filterline.$(ext)
(e.g.1.log
will generate file1.log.filterline.log
).
- Open Command Palette (⇧⌘P) and type
FilterLine
, selectFilter Line By Input Regex
in the list. - Type a regular expression and hit
<Enter>
. - The extension will output matching lines in a new file with postfix
.filterline.$(ext)
(e.g.1.log
will generate file1.log.filterline.log
).
- Create config file in
.vscode
directory (e.g..vscode/filterline.json
or.vscode/filterline.eoml
). - Edit the
filterline.json/.eoml
file to desired format. - Open command palette (⇧⌘p) and type
filterline
, selectFilter Line By Config File
in the list.
Filter files without opening from Explorer file's context menu. Especially useful for large files (>= 50MB) due to vscode's limitation.
Same as with Explorer context menu. Also can help with large files (>= 50MB) (vscode's limitation)
Each "Input by..." filter option has history of N last patterns (configurable in extension settings)
Since vscode's limitation, when filter large files (e.g. >= 50MB), vscode extension can not get the current open document. As a workaround you can filter these files from context menu (both Title and Explorer).
Extension settings has option for saving filtering result (disabled by default).
- There are 2 file types
filterline.json
andfilterline.eoml
. eoml
is a simple config file format that created by me(everettjf
), only for this project(vscode-filter-line
) at present. For more information, please visit eoml.
There are 3 format types. As they are so simple, I will not describe them here. Please visit the demo directly :
stringlist
: String list json or eomlregexlist
: Regular expressions list json or eomlgeneral
: This is default iftype
is not specified. json or eoml
Command line replacement for this extension : filterline
Enjoy!