Files
The Files tab is an editor for the project files. PHP files get the same IntelliSense as the Scratchpad. To review and commit changes, use Git › Changes. See Git Changes.
The tab is available for all projects.
Drag the line between the tree and the editor to change their widths. The app keeps the widths.
The file tree
- The app reads a folder only when you open it, so large folders such as
vendorandnode_modulesdo not slow down the tab. - In WSL mode, the tree checks open folders for changes every few seconds.
- The
.gitfolder is not shown.
In a Git repository, file names use the same colors as Git › Changes:
| Color | Meaning |
|---|---|
| Green | New or untracked file |
| Yellow | Modified file |
| Blue | Renamed file |
| Red | Deleted file |
| Dimmed | Ignored by .gitignore (for example vendor or node_modules) |
Go to file
Press ⌘ P (macOS) or Ctrl P (Windows and Linux) on any project tab, or click Go to file… above the tree.
- The letters that you type do not have to be next to each other in the file name:
ucandusrcontrolerboth findUserController.php. - The search looks at file and folder names, not at file contents.
- Before you type, the list shows your recent files.
- In a Git repository, files that
.gitignoreignores are not in the list. In a folder that is not a Git repository,vendorandnode_modulesare not in the list.
Search in files
Press ⌘ Shift F (macOS) or Ctrl Shift F (Windows and Linux) on any project tab, or click Search above the tree.
| Button | Key (macOS / Windows and Linux) | What it does |
|---|---|---|
| Aa Match Case | ⌥ C / Alt C | Finds only text with the same upper and lower case letters |
| ab Match Whole Word | ⌥ W / Alt W | Finds only complete words |
| .* Use Regular Expression | ⌥ R / Alt R | Reads the text as a JavaScript regular expression, as in the editor's Find |
- The search uses the same file list as Go to file, so ignored files are not searched.
- Binary files and files larger than 1 MB are not searched.
- A search shows a maximum of 5,000 results. If there are more, make the search more specific.
- The app remembers the button settings.
Open and edit files
- Click a file to preview it. The tab name is in italics. The next file that you click replaces the preview.
- Double-click a file, or type in it, to keep its tab open.
When you go to a different tab or project and come back, the Files tab shows the same view. The app keeps for each project:
- The open tabs, the active tab and unsaved changes
- The expanded folders in the tree
- The search text, the results, and the result groups that you collapsed. If a search was not complete when you left, it runs again.
- The Files or Search view, and your recent files
The app does not keep this view after a restart. Save your changes before you quit.
The app saves a file in place. It keeps the line endings (LF or CRLF), a UTF-8 byte order mark if there is one, and the file permissions. This also keeps bind mounts in DDEV containers working.
Editor support by file type
| File | Editor |
|---|---|
.php | PHP IntelliSense: completions, hover, signature help and diagnostics |
.ts, .js, .json, .css, .scss, .html | Completions and syntax checks |
.md, .markdown, .mdx | Reader, Split and Source views. See Markdown files. |
.blade.php, .twig, .yaml, .env, .xml, .sql and other text files | Syntax highlighting |
Images (.png, .jpg, .gif, .webp, .svg, .ico) | Preview |
| Binary files | Not opened. Use Reveal or Open in Default App. |
PHP IntelliSense uses the same PHP language server as the Scratchpad. The status above the editor shows Indexing project, then IntelliSense ready. The first start for a project can take a few minutes.
Markdown files
A Markdown file opens in the Reader view, formatted the way GitHub shows it. Use the switch above the editor to change the view:
| View | Shows |
|---|---|
| Reader | The formatted page |
| Split | The editor on the left and the formatted page on the right. The page updates as you type, and it follows when you scroll the editor. |
| Source | Only the editor |
The app remembers the view of each file until you quit. If you open a Markdown file from a search result while it is in Reader, it switches to Source and goes to the line of the result. In Split, it stays in Split and goes to the line.
The Reader shows what is in the editor, including changes you have not saved.
The Reader supports:
- Tables, task lists, strikethrough and GitHub alerts (
> [!NOTE],> [!TIP],> [!IMPORTANT],> [!WARNING],> [!CAUTION]) - Code blocks with syntax highlighting. Hover over a block and click the copy icon to copy the code.
- Front matter (the
---block at the top of the file), shown as a small table above the page - A link icon next to each heading when you hover over it
Links in the Reader:
| Link | What happens |
|---|---|
To a .md file in the project, for example docs/install.md#database | The file opens in the Files tab, at that heading |
To a heading in the same file, for example #usage | The page scrolls to that heading |
https://, http:// or mailto: | Opens in your browser or mail app |
A link to a .md file outside the project does not open. The app shows This link points to a file outside the project.
The Reader shows images from https:// addresses, and image files inside the project folder, for example . If an image is missing or outside the project, you see its alt text in a dashed box instead.
Large files and other encodings
| File | What happens |
|---|---|
| Up to 1 MB | Opens for editing |
| 1 MB to 10 MB | Opens read-only |
| More than 10 MB | Does not open. Use Reveal or Open in Default App. |
| Not UTF-8 (for example Latin-1) | Opens read-only, so its encoding does not change |
When a file changes on disk
- If you have no unsaved changes, the editor loads the new version when you come back to the window.
- If you have unsaved changes, a yellow bar shows This file changed on disk after you opened it:
- Compare shows the file on disk and your version side by side.
- Reload discards your changes and loads the file from disk.
- Overwrite saves your version over the file on disk.
Run a command on save
You can make the app run a command each time you save a file in the Files tab. For example, run rustfmt on Rust files, or Laravel Pint on PHP files.
To add a command:
- Open Preferences › Editor.
- Click Add command.
- In File pattern, type the files that the command is for, for example
*.rs. - In Command, type the command, for example
rustfmt {file}. The app puts the full path of the saved file in place of{file}. - Click Save.
| Pattern | Matches |
|---|---|
*.rs | Every .rs file, in any folder |
*.{js,ts} | Every .js and .ts file |
src/**/*.php | .php files in src and its subfolders |
A pattern without a / matches the file name. A pattern with a / matches the path from the project folder.
- The command runs in the project folder. In WSL mode, it runs in your WSL distribution.
- If more than one pattern matches, the commands run one after the other, in the order of the list. If one fails, the rest do not run.
- If a command changes the file, for example a formatter, the editor shows the new content. Undo (⌘ Z or Ctrl Z) brings back your version.
- If a command fails, a notification shows the command and its output.
- A command that runs for more than 60 seconds is stopped.
Terminal panel
The Files tab has a terminal under the editor, as in VS Code. Use it to run the file you are editing, or any other command, without leaving the tab.
- Press Ctrl ` to show or hide it. This key is the same on macOS, Windows and Linux. You can also click the Terminal bar under the editor.
- Drag the line above the terminal to change its height. The app keeps the height, and keeps the terminal open or closed as you left it.
- The terminal opens in the project folder.
- Each project has its own terminal. It is not one of the tabs in the Terminal tab.
- If Restore Terminal Tabs After Restart is on, the terminal shows its history again after a restart.
The context menu
Right-click a file or a folder, or select it and press Shift F10.
| Item | Files | Folders | What it does |
|---|---|---|---|
| Open | ✓ | Opens the file in a tab that stays open | |
| Open in Default App | ✓ | Opens the file in the default app for that file type | |
| New File… / New Folder… | ✓ | Creates an item in the folder | |
| Reveal in Finder / Explorer | ✓ | ✓ | Shows the item in your file manager |
| Open in Terminal | ✓ | ✓ | Opens a terminal in the folder (for a file, in its folder) |
| Copy Path / Copy Relative Path | ✓ | ✓ | Copies the full path, or the path from the project folder |
| Rename (F2) | ✓ | ✓ | Changes the name in place. Press Enter to confirm. |
| Move to Trash | ✓ | ✓ | Moves the item to the Trash (Recycle Bin on Windows) |
To create a file or folder in the project folder, right-click an empty area of the tree, or use the New File and New Folder buttons above the tree.
Executable files
Open in Default App is not available for executable files (for example .app, .command, .exe, .bat, .ps1). This prevents a project file from running by accident. Use Reveal to find the file.
Move to Trash
The app asks before it moves an item to the Trash. Select Do not ask again to skip this question next time.
In WSL mode, the app uses the Trash of your WSL distribution (gio trash). If the distribution has no Trash, the app asks if you want to delete the item permanently. You cannot undo a permanent delete.
Keyboard shortcuts
| Key | Action |
|---|---|
| ⌘ P / Ctrl P | Go to file |
| ⌘ Shift F / Ctrl Shift F | Search in files |
| Ctrl ` | Show or hide the terminal panel |
| ↑ ↓ | Move in the tree |
| → ← | Open or close a folder |
| Enter | Open the selected file in a tab that stays open |
| F2 | Rename |
| Shift F10 | Open the context menu |
Safety
- The app changes files only inside the project folder. It does not write, rename, create or move to the Trash through a link that points outside the project.
- A new name cannot contain
/or\. On Windows, names such asCONorNUL, and names that end with a dot or a space, are not allowed. - Opening a file never runs it.