Text View
Text view shows a file as numbered lines. It is the first view for text and log files, and it is available for every file: select Text in the view switcher. Text view scrolls through the whole file, whatever its line count.
Line numbers and the gutter
Section titled “Line numbers and the gutter”The gutter on the left shows the line numbers, starting at 1. To hide or show it, select More actions (…) → Line numbers, or change the Line numbers setting.
The gutter also shows a bookmark icon on bookmarked lines (hover over it to see the bookmark’s letter) and, when a timestamp format is active and the Delta-t gutter setting is on, the time since the previous timestamped line. Both need the line numbers to be visible.
Click a line to make it the active line. The active line has a highlighted background and a bar on its left edge. When you move to a search match, that line becomes the active line.
Word wrap and the column ruler
Section titled “Word wrap and the column ruler”Long lines scroll horizontally by default. To wrap them at the window edge instead, press Alt + Z, select Wrap in the toolbar, or turn on the Word wrap setting. To scroll horizontally with a mouse wheel, hold Shift while you scroll.
When word wrap is off, a column ruler above the text marks every fifth column and labels every tenth. Turn it off with the Column ruler setting. The ruler is hidden while word wrap is on.
The Tab width setting sets how many columns a tab takes: 1, 2, 4, or 8. The default is 4.
Scroll and move
Section titled “Scroll and move”Text view responds to these keys:
| Key | Action |
|---|---|
Up, Down |
Scroll one line |
Page Up, Page Down |
Scroll one screen |
Space, Shift + Space |
Scroll one screen down or up |
Home, End |
Go to the first or last line |
Ctrl + G |
Go to a line number |
Page Up, Page Down, Home, and End work even when the text does not have keyboard focus, as long as no text box or dialog has focus. For Go to line, see Go to line.
Overview markers
Section titled “Overview markers”Markers beside the scrollbar show where things are in the whole file:
- Search matches, for the first 10,000 matches. See The 10,000-match limit.
- The current match.
- Line bookmarks.
- The first new line after a reload that added lines to the end of the file.
The marks cannot be clicked. To move through the file, drag the scrollbar thumb, or click the scrollbar track above or below it to scroll a screen at a time.
Turn the marks off with the Overview markers setting.
Long lines
Section titled “Long lines”Text view shows the first 2,000 bytes of each line. The rest of a longer line is not shown, and nothing marks the cut. Search still finds matches in the hidden part, but the match is not highlighted on screen. In a UTF-16 file, 2,000 bytes is about 1,000 characters.
For other size limits, see Limits.
Select and copy lines
Section titled “Select and copy lines”To select a range of lines, hold Shift and click the first line, then hold Shift and click the last line. The status bar shows how many lines are selected. To select a rectangular block of text, turn off word wrap, then hold Alt and drag. Press Ctrl + C to copy the selection, and Esc to clear it.
For copy limits and the other ways to select, see Selecting and copying.
Right-click a line to open the line menu, which copies the line, shows the JSON in it, or sets a bookmark on it. See Context menus.
Other tools in Text view
Section titled “Other tools in Text view”These features add to Text view. Each has its own page:
- Log-level colours: tints lines by log level, such as
ERRORandWARN. See Log levels and highlighters. - Highlighters: color the text that matches your own patterns. See Log levels and highlighters.
- Delta-t gutter and Time histogram: show the time between log lines and how lines spread over time. See Timestamps and go to time.
- New-line markers: after a reload adds lines to the end of the file, a green bar marks the new lines. See Live reload.
- Grep view: shows only the lines that match a search. See Grep view.
- JSON in a line: press
Alt + Jto show the JSON in the active line, formatted. See JSON in a line. - Scratchpad: collect lines and convert text such as Base64 or epoch times. See Scratchpad.
Encoding and invalid bytes
Section titled “Encoding and invalid bytes”Text view decodes the file with the encoding shown in the status bar. A byte order mark at the start of the file is not shown. Bytes that are not valid in the encoding show as the replacement character �. To change the encoding, see Encodings and line endings.
In files encoded as GBK, gb18030, Big5, EUC-JP, EUC-KR, Shift_JIS, ISO-2022-JP, or windows-874, search matches are not highlighted in the line. The matches are still listed in the search panel, and F3 still moves to them.
Display settings
Section titled “Display settings”These settings change how Text view looks. All of them are in Settings:
| Setting | Default |
|---|---|
| Viewer font size | 13 |
| Tab width | 4 |
| Word wrap | Off |
| Column ruler | On |
| Overview markers | On |
| Line numbers | On |
| Canvas renderer | Off |
| Log-level colours | On |
With Canvas renderer on, Text view and Grep view draw their lines as graphics rather than as text. You cannot select text within a line with the mouse (line and block selection still work), and match highlights can be misplaced on lines that contain tabs.
Next steps
Section titled “Next steps”- Searching a file: find text and move between matches
- Grep view: show only the lines that match a search
- Selecting and copying: select lines or a block of text and copy it