Grep View
Grep view filters Text view to the lines that match the current search, plus a few lines of context around each match. Use it to read every match in a large log without scrolling past the lines in between.
Open Grep view
Section titled “Open Grep view”Grep view needs a finished search with at least one match:
-
Open the file in Text view.
-
Run a search with the search panel (
Ctrl + F). See Searching a file. -
Press
Ctrl + Shift + G, or select the funnel button (Grep view) in the toolbar.
You can also open Grep view from More actions (…) → Grep view, from the command palette (Toggle grep view), or with Filter View in the search panel’s actions row. To show the actions row, select More actions (…) in the search panel.
Grep view is not available for hex byte searches or strings searches. While 0x or Str is on in the search panel, the Grep view commands are dimmed.
What Grep view shows
Section titled “What Grep view shows”Each matching line appears with its original line number. Context lines appear dimmed above and below each match. A dashed line separates groups of lines that are not next to each other in the file.
Grep view lists every line that matches, even when the search found more than 10,000 matches. Only the first 10,000 matches are highlighted in the line and reachable with F3. Lines after that still appear in Grep view, without highlights. See The 10,000-match limit.
Context lines
Section titled “Context lines”Grep view shows 2 context lines before and after each match by default. To change the number, use the - and + buttons next to Ctx in the search panel’s actions row. The range is 0 to 10. Vaste keeps the number until you close the file.
Move between matches
Section titled “Move between matches”Press F3 for the next match and Shift + F3 for the previous one, or select a match in the search panel’s results list. Grep view scrolls the match to the middle of the screen.
Go to line and Go to time are not available in Grep view. Leave Grep view first.
Leave Grep view
Section titled “Leave Grep view”To return to Text view, press Ctrl + Shift + G again, select the funnel button, or select Exit Filter in the search panel. Text view scrolls to the current match.
Vaste also leaves Grep view when you:
- Start a new search. After the search finishes, open Grep view again.
- Switch to another view.
- Reload the file, including an automatic reload.
- Reopen the file with another encoding.
- Jump to a bookmark.
With Auto reload on, a log file that another program is writing reloads often, and each reload closes Grep view. To read the matches without interruption, turn off Auto reload while you read, or run the search again after a reload. See Live reload.
What works in Grep view
Section titled “What works in Grep view”Word wrap, the column ruler, line numbers, log-level colors, and highlighters work in Grep view as they do in Text view. Right-click a line for the line menu.
Grep view does not show overview markers, bookmark icons, the delta-t gutter, or the time histogram, and it does not support block selection.
To copy or export the matching lines, use Copy or Export… in the search panel. Both include only the matching lines, not the context lines. See Copy or export matching lines.
Next steps
Section titled “Next steps”- Combining searches: show the lines that match one search but not another
- Working with results: copy, export, and the 10,000-match limit