Caxton
Features Benchmarks Pricing Docs How it works Changelog Support About Download Free
Guide
Getting Started Opening Large Files Find & Replace Filtering CSV Workbench Transform Cells Validate & Repair Column Profiles Sort & Duplicates Editing at Scale Power Editing Navigation & Bookmarks The Sidebar Search Files or Commands The Inspector Log Mode Compare View Themes Sessions & Recovery License
Reference
Keyboard Shortcuts Menu Reference Settings & Storage Encodings
Switching
Coming from EmEditor
Engineering
How Caxton Works Benchmarks How Caxton Is Tested

Filtering: conditions, presets, extract.

A filter shows only the lines that match, like grep, except the result is still your document: scrollable, searchable, editable, with original line numbers.

This page covers the filter bar, which shows only the lines that match a condition while the document stays editable, and the Filter Lines panel, which chains conditions with AND and OR and, in a log, filters by Severity and by Time window. It also covers Extract and Save… for the matching lines, Edit ▸ Bookmarks ▸ Bookmark All Filtered Lines, saved filters with Export Filters… and Import Filters…, Replace All under a filter, and Entire File, which takes a filter past the loaded slice or tail.

The filter bar

Press ⇧⌘L, type a condition, press Return. With text selected, the bar opens with it as the condition and runs at once.

A 1 GB log filtered to its ERROR lines

Only the matching lines remain visible: 159,597 of 8 million. The gutter keeps the original line numbers.

  • Per-condition toggles: Aa case, W whole word, .* regex, and ≠ to exclude matching lines instead. A regex condition is evaluated against each line without its line break, so ^ and $ anchor the line's start and end and \s+$ matches trailing spaces, not the line ending.
  • In a log document the bar gains a Severity popup: Warn and above, Error and above, Fatal only, Info and above, Debug and below, or lines with no severity word. It is a gate over every condition in the bar and the digest (AND, OR and negation included), and the digest spells it out: Severity: Warn and above over all rows. It reads the same words that tint the rows (ERROR, WARN, INFO, DEBUG, FATAL and their relatives, plus your own from View ▸ Log ▸ Severity Patterns…, which win). A line that has no level word of its own and no timestamp follows its record, so the stack trace under an ERROR line stays with it, up to 4,096 lines or 1 MB back to the first line of the record, the same reach Go to Time and Extract Incident Window use. Changing the patterns re-runs an active severity filter.
  • Filtering 80.6 million lines takes about 0.87 s in our measurements.
  • Editing while filtered works; if a change makes results stale, a Refresh chip appears rather than the view churning under you.
The filter bar on a log with the text condition POST and the Severity popup set to Warn and above, only warning and error lines visible

POST with Severity: Warn and above on the 1 GB log: 110,866 of 8,017,983 lines. The popup gates the text condition; the counter is exact.

  • Closing the bar (✕) clears the filter and restores the full view. Esc returns focus to the editor and keeps the filter.

Multiple conditions

Click + to add conditions in the Filter Lines panel. Conditions chain with per-row AND/OR joiners (AND binds tighter), and each row has its own case/word/regex/≠ toggles. A row can be a text condition, a Severity level, or a Time window (From and To in the Go to Time forms, blank for an open edge, read in the log's own zone; a To edge typed without a fraction covers its whole second, so 14:10:59 includes 14:10:59.999). The Severity and Time window kinds appear only in a log document; on any other file, an HTML page or a CSV read as text, every row is a text condition and the kind popup stays out of the row. Any row can match by log severity instead of text: pick a level in the row's Severity popup and the text field goes quiet for that row. The Severity popup in the bar stays the gate: Apply and Extract All take its current choice, even one made after the panel opened. The panel button is mode-aware: in Table Mode the same button opens the grid's Filter Rows panel instead, where each condition can target the whole line, any column, or one specific column, and compare with Contains, Does Not Contain, Equals, Greater Than, or Less Than.

The Filter Lines panel with three OR conditions

The panel owns every condition. Apply runs the whole chain; Extract All sends the matching lines to a new document.

In the bar itself, extra conditions never stack rows; they fold into a one-line digest under the query field. Click the digest to reopen the panel.

The filter bar showing its one-line digest of extra conditions

Three conditions active, one slim line of chrome: the digest reads the whole chain back to you.

Working with results

  • Extract (Extract All in the Filter Lines panel): copy every matching line into a new untitled document. If the filter timed out before covering the whole file, Extract refuses and gives that as its reason rather than export a partial view. Save… in the panel, or Edit ▸ Find ▸ Save Filtered Lines…, writes the same lines straight to a file you name, the header first in a table, with the same refusal.
  • Edit ▸ Bookmarks ▸ Bookmark All Filtered Lines: bookmarks the lines the filter shows, up to the first 10,000. Past that, the status bar gives the number it bookmarked out of the total. To work with every line the filter shows, write them all to a file with Edit ▸ Find ▸ Save Filtered Lines….
  • Presets: save a condition chain by name and recall it from the bar's Filters menu; recent filters live under the clock icon. Its menu reads No Recent Filters until a filter has run.
  • Import: drop a text file (up to 1 MB) on the bar and each non-empty line becomes an OR condition, up to 12 conditions. The banner counts the terms taken out of the file's total.
  • Delete Lines Matching… (Text menu): the destructive sibling: removes matching lines, streaming to a new document when the result would be enormous.

Saved filters

The bar's Filters button opens the menu of saved filters. Save Filter As… opens Save Filter, a form with one Name field: Save keeps the bar's whole configuration under that name, and a filter with the same name is replaced. An empty filter has nothing to save, and the status bar points that out. Each saved filter is listed by name below; picking one puts its conditions back in the bar. Delete ▸ lists the same names, and picking one removes that filter at once.

Export Filters… writes every saved filter to a JSON file (caxton-filters.json to start); it is dimmed until a filter is saved. Import Filters… reads such a file, on this Mac or another, and adds its filters, replacing any with the same name. Settings & Storage lists where saved filters are kept.

Replacing under a filter

While a filter is on, Replace All changes only the lines the filter shows, unless the find bar's scope line is switched to the whole file (Find & Replace). When the filter hides every line, Replace All does not run, with a banner that the filter hides every line, so there is nothing visible to replace. A replace that would change nothing ends with a note that there is nothing to do.

Slice scope

In slice or tail mode the filter labels itself with the loaded window ("filtering loaded slice (500 MB of 50 GB)") and offers Entire File, which scans past the loaded slice on disk.

Limits

  • The empty line after a final line break is not a line of text. A filter never shows it and never counts it, whether the condition is negated or not. The count in the filter bar is of lines of text, as the status bar counts them.
  • Entire File checks a line over 4 MB in pieces. Plain text is found wherever it lies in a line of any length. A regular expression is run over each piece with the megabyte before it, so a single match longer than 1 MB that falls across two pieces can be missed.
  • The results are marked when that could have happened. When a regular expression has checked such a line in pieces and found nothing in it, the count outside the slice ends in possibly incomplete, and the results panel shows Possibly incomplete with the number of lines for as long as those results are shown. Show Lines lists the lines, 1,000 at a time, with Next Lines and First Lines to move through them, and Show Matches goes back. A click on a line loads the slice around it, where the filter checks the whole line.
  • The notice does not appear for plain text, for a line the expression matched, or for a line inside the loaded slice.