11 KiB
11 KiB
File view
The file view is the third column (Col C), between the Explorer and the Claude Code column. It shows one file at a time: a bar on top, the file below it.
Guide index · Related: Markdown, Diff, Code symbols, Pass on to Agent, Status bar
At a glance
+------------------------------------------------------------------+
| (1)[php] (2)app/Http/UserController.php (3)o (4)+12 -3 (5)[Diff] |
+------+-----------------------------------------------------------+
| (6)40| public function show(User $user) |
| 41| { |
| |42| $user->load('roles'); (7) changed line |
| |43| return view('users.show'); |
| =44| } (8) rule: lines removed here|
| 45| |
| | (9) the code: type here, select, right-click |
+------+-----------------------------------------------------------+
- Type badge: a small coloured chip with the file extension.
- Path: the file's path inside the project. A long path is cut at the start. Hover it to see it in full.
- Unsaved dot: a small dot shows when the file has edits you have not saved.
- Change counts: for a file with git changes, added lines in teal (
+12) and removed lines in amber-deep (-3). - View buttons: Preview on Markdown files, Diff on changed files. The button of the current view is lit.
- Line numbers: one number per line. Click a number to select that line.
- Changed line: a line the change added or edited gets a teal tint, a teal left rule and a teal number.
- Removed-lines rule: where lines were only removed, a thin amber-deep rule sits on the edge of the next line.
- Code: the live, editable text of the file, with syntax colours.
Features
Open a file
- Click a file in the Explorer, choose Open in editor on a row in the Git view, pick a result in Search, or use Go to file.
- The new file replaces the one that was open. Helder shows one file at a time.
- A file always opens fresh from disk.
- When you open a file at a line (from Search or the symbol popup), that line moves to the middle of the pane and flashes amber for about a second.
composer.locknever opens. A short "Too big." message shows over the column instead.
The live view and changed lines
- A file without git changes opens as plain, editable code. It has no Diff button.
- A file with git changes opens in the same editable view, with its changed lines marked:
- Teal tint, teal left rule and teal line number: a line the file holds now that is new or edited.
- A thin amber-deep rule on the top edge of a line: lines were removed just above it. At the end of the file the rule sits under the last line.
- Removed lines never show inline. To see them, open the Diff.
- Right-click a marked line and choose Show diff to open the Diff centred on that line. A left click places the caret, as on any line.
- In a new file every line is teal, so its menu has no Show diff.
- The marks follow your edits once git sees the saved file.
Edit and save
- Type to edit. Undo and redo work as usual (
Cmd+Z,Cmd+Shift+Z). Cmd+Ssaves the file. A "Saved" notification confirms it. If the write fails, you see "Save failed" and the file stays open with your edits.Cmd+Son a file without edits does nothing.- After a save, git re-reads, so the Git view and the status bar update.
Auto-save
- Auto-save is off by default. Turn it on with
editor.autoSavein the configuration. - With auto-save on, the file saves about 0.6 seconds after you stop typing. It shows no notification.
- Open edits are also written before the window closes or the project switches.
Indentation
Tabinserts spaces, never a tab character. The number of spaces iseditor.tabSize(default 4).- With several lines selected,
Tabindents every line one level. Shift+Taboutdents every touched line one level. It removes one tab, or up totabSizespaces.- The status bar shows the setting, for example
Spaces: 4.
Word wrap
- Long lines wrap onto the next row when word wrap is on. Otherwise you scroll sideways.
editor.wordWrapsets it:markdown(default) wraps only Markdown files,onwraps every file,offwraps none.- A wrapped line shows its number only on its first row.
Line numbers and selection
- Line numbers are always shown.
- Click a line number to select that whole line.
Shift+click another number to extend the selection to it. Cmd+Aselects the whole file. It also works when the keyboard is not in the code, as long as a file is open.- The status bar shows the caret position as line and column.
No guides or whitespace marks
- Helder draws no indent guides and no visible whitespace marks.
- The editable view does not tint the caret line. The caret itself is amber.
Unsaved changes when you switch or close
- Open another file (or the same file again) while the current file has unsaved edits, and a dialog asks: Save, Don't Save or Cancel.
- Save writes the file, then opens the new one.
- Don't Save drops the edits, then opens the new one.
- Cancel keeps the current file and its edits.
- With auto-save on, Helder saves silently and does not ask.
- Closing the window or switching project asks the same question for every file with unsaved edits.
Close a file
Cmd+Wcloses the open file. With unsaved edits it asks Save, Don't Save or Cancel first.- With no file open,
Cmd+Wcloses the window.
Empty state
With no file open, the bar is empty and the pane shows "No file open" with three shortcuts:
| Shortcut | Action |
|---|---|
Cmd+O |
Open folder |
Cmd+Shift+O |
Recent projects |
Cmd+F |
Search files & content |
Files that are not plain text
- Images (png, jpg, gif, webp, svg, bmp, ico, avif and more) show as a picture, centred, on a checkerboard so transparent parts stay visible. They are read-only. An image that cannot be read shows "Can't preview this image".
- Binary files (pdf, zip, fonts, audio, video, databases and the like, or any file whose content turns out binary) show "This file cannot be displayed". There is no Preview or Diff button.
- Deleted in the change: a file git sees as deleted shows "No updated version" with the note "This file was deleted in the change." The Diff button still opens the old content.
- Added in the change: a new file shows all its lines in teal. In the Diff, the left side is empty.
- Removed from disk while open: the text stays on screen as unsaved edits, so nothing is lost. The unsaved dot shows. Save to write the file back, or close and choose Don't Save.
- Too big:
composer.locknever opens. A changed file over 1 MB opens, but shows no line marks, and its Diff says "Too big."
Changes on disk
- Helder watches the project. When a file changes on disk (for example, the agent edits it), the open file updates by itself.
- If you have unsaved edits, Helder keeps your edits and does not overwrite them.
Cmd+Rre-reads git, the file tree and the open file. For the open file the disk wins: unsaved edits are dropped without a prompt.
Find
- The file view has no find bar of its own.
Cmd+Fopens project-wide Search. With text selected, the first line of the selection fills the search field.
Zoom
- View > Zoom In (
Cmd++), Zoom Out (Cmd+-) and Actual Size (Cmd+0) change the text size, about 10 percent per step. - Zoom applies to the code, the Diff and the terminals. The Markdown preview keeps its size.
Right-click and pass on
- Right-click in the code for Pass on reference (or Pass on selection with text selected) and Copy reference.
Cmd+Rightwith text selected opens the pass-on prompt for that selection.- See Pass on to Agent and the right-click menu.
Class names in PHP
- Hold
Cmdto underline the class names the project declares.Cmd+click one to open the symbol popup.
Recent files
Cmd+UporCmd+Downwhile you work in the file view opens the list of recently opened files. See Go to file.
Syntax colours
These file types get syntax colours:
| Language | Extensions |
|---|---|
| PHP (including Blade, HTML with PHP parts) | .php |
| JavaScript | .js, .mjs, .cjs, .jsx |
| TypeScript | .ts, .tsx |
| Python | .py |
| HTML, XML and Vue | .html, .xml, .vue |
| CSS | .css, .scss |
| JSON | .json |
| Markdown | .md (code blocks get the colours of their language) |
| Shell | .sh, .bash, .env files |
| YAML | .yml, .yaml |
Every other text file shows plain text. The status bar shows the language name.
Keyboard
| Keys | Action |
|---|---|
Cmd+S |
Save the open file |
Cmd+W |
Close the open file (or the window when none is open) |
Cmd+M |
Switch a Markdown file between code and Preview |
Cmd+A |
Select the whole file |
Tab / Shift+Tab |
Indent / outdent |
Cmd+Z / Cmd+Shift+Z |
Undo / redo |
Cmd+Right |
Pass on the selection to the agent (with text selected) |
Cmd+click |
Open the symbol popup for a PHP class name |
Cmd+F |
Search the project, seeded with the selection |
Cmd+Up / Cmd+Down |
Recent files |
Cmd+R |
Reload from disk (drops unsaved edits) |
Cmd++ / Cmd+- / Cmd+0 |
Zoom in / zoom out / actual size |
Settings
| Setting | Default | Effect |
|---|---|---|
editor.autoSave |
false |
Save about 0.6 s after you stop typing, and never ask about unsaved edits |
editor.tabSize |
4 |
Spaces inserted by Tab, and the width of one indent level |
editor.wordWrap |
markdown |
markdown wraps Markdown only, on wraps all files, off wraps none |
session.restoreOnLaunch |
true |
Reopen the last open file when the project opens |
See Configuration for where these live.
Related
- File view: Markdown: the rendered Preview for Markdown files.
- File view: Diff: the full-screen side-by-side comparison.
- Code symbols: where a PHP class is declared and used.
- Pass on to Agent: send a line or a selection to Claude.
- Git: the changes that drive the line marks and the counts.
- Status bar: caret position, indentation and language.
- Layout: how the File column shows, hides and resizes.