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 |
.blade.php, .twig, .yaml, .md, .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.
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.
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 |
| ↑ ↓ | 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.