Skip to content

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.

DevWorkspace Pro — acme-app
Go to file… ⌘P
app
Actions
ApplyCoupon.php
Http
Models
Cart.php
Coupon.php
User.php
config
database
node_modules
routes
tests
vendor
.env
composer.json
Cart.php ● ApplyCoupon.php
IntelliSense ready
12 class Cart extends Model
13 {
14 public function total(): float
15 {
16 $subtotal = $this->items->sum('price');
17
18 return $subtotal - $this->cou
19 }
20 }
coupons BelongsToMany
couponTotal float
countItems int
Terminal
⌃`
usrcon ⌘P
UserController.php app/Http/Controllers
UserControllerTest.php tests/Feature
UserConsentForm.php app/Livewire
The file tree with Git colors, PHP IntelliSense in the editor, and Go to file.

The file tree ​

  • The app reads a folder only when you open it, so large folders such as vendor and node_modules do not slow down the tab.
  • In WSL mode, the tree checks open folders for changes every few seconds.
  • The .git folder is not shown.

In a Git repository, file names use the same colors as Git › Changes:

ColorMeaning
GreenNew or untracked file
YellowModified file
BlueRenamed file
RedDeleted file
DimmedIgnored 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: uc and usrcontroler both find UserController.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 .gitignore ignores are not in the list. In a folder that is not a Git repository, vendor and node_modules are 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.

ButtonKey (macOS / Windows and Linux)What it does
Aa Match Case⌥ C / Alt CFinds only text with the same upper and lower case letters
ab Match Whole Word⌥ W / Alt WFinds only complete words
.* Use Regular Expression⌥ R / Alt RReads 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 ​

FileEditor
.phpPHP IntelliSense: completions, hover, signature help and diagnostics
.ts, .js, .json, .css, .scss, .htmlCompletions and syntax checks
.md, .markdown, .mdxReader, Split and Source views. See Markdown files.
.blade.php, .twig, .yaml, .env, .xml, .sql and other text filesSyntax highlighting
Images (.png, .jpg, .gif, .webp, .svg, .ico)Preview
Binary filesNot 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:

ViewShows
ReaderThe formatted page
SplitThe 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.
SourceOnly 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:

LinkWhat happens
To a .md file in the project, for example docs/install.md#databaseThe file opens in the Files tab, at that heading
To a heading in the same file, for example #usageThe 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 ![Logo](img/logo.png). If an image is missing or outside the project, you see its alt text in a dashed box instead.

Large files and other encodings ​

FileWhat happens
Up to 1 MBOpens for editing
1 MB to 10 MBOpens read-only
More than 10 MBDoes 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:

  1. Open Preferences › Editor.
  2. Click Add command.
  3. In File pattern, type the files that the command is for, for example *.rs.
  4. In Command, type the command, for example rustfmt {file}. The app puts the full path of the saved file in place of {file}.
  5. Click Save.
PatternMatches
*.rsEvery .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.

ItemFilesFoldersWhat 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 ​

KeyAction
⌘ P / Ctrl PGo to file
⌘ Shift F / Ctrl Shift FSearch in files
Ctrl `Show or hide the terminal panel
↑ ↓Move in the tree
→ ←Open or close a folder
EnterOpen the selected file in a tab that stays open
F2Rename
Shift F10Open 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 as CON or NUL, and names that end with a dot or a space, are not allowed.
  • Opening a file never runs it.

DevWorkspace Pro - One workspace for every project