Skip to content

Files and editor

Files is a file tree of the workspace you’re looking at, coloured by git status, and an editor that opens files as tabs next to your agents. The editor highlights code, talks to language servers for completion and go to definition, and finds text in all files. It saves by itself and never overwrites an agent’s edit.

Press ⇧⌘E, click Files on the right rail, or choose View › Files. The panel opens on the right of the work area, in Workspaces mode; from another mode, the key switches to Workspaces. Press it again to hide the panel. Drag its edge to change its width.

The tree shows the copy of the front tab: your branch or a workspace. Switch tabs and the tree follows. When the project has workspaces, the line under the header names the copy shown.

Drakkar with a file open: store.py of the health-endpoint workspace in a tab next to a shell tab, Python code with line numbers; on the right the Files panel with Project and Changes, the copy health-endpoint, and the folders bookmarks and tests, where app.py is blue (modified) and test_app.py red (not in git); the status bar reads Ln 1, Col 1, Python, UTF-8 · LF · 4 spaces and pyright · off
store.py of the health-endpoint workspace. In the tree, the changed app.py is blue, the new test_app.py red.

At the top, Project shows the whole folder as it is on disk, Changes only changed, new and deleted files. The buttons on the right of the header select the open file in the tree, expand all folders, collapse all folders, and show or hide excluded folders (the eye).

Names are coloured by git status; folders keep their colour, except ignored ones.

Colour Status
Blue Modified or renamed
Green Added
Red Not in git, or in conflict
Olive Ignored

A deleted file shows only in Changes: grey and struck through, with −N for its lines. It doesn’t open; Git › Rollback… in its menu brings it back.

Hover a row to see its path and status. An excluded folder has a red-orange outline, and the names inside it are muted.

  • Click a file to open it. To open a folder, click its arrow or double-click the row. Move with the arrows; ↵ opens a file with the cursor in the editor, or opens and closes a folder.
  • ⌘+ and ⌘- expand and collapse all folders.

Right-click a file or folder:

  • Open; Open in Review if it has changes.
  • Copy path (⌘C), Copy @path for agent (⇧⌘C): @bookmarks/store.py, ready to paste into a prompt. Reveal in Finder (⌥⌘R).
  • Git: Add to .gitignore (for everyone, once committed), Add to .git/info/exclude (only for you), and Rollback… (⌥⌘Z) to undo its uncommitted changes.
  • Rename… (⇧F6). Update references asks the language server to fix the code that uses the file.
  • Delete… (⌘⌫) moves it to the macOS Trash; an open tab of it closes.

A folder’s menu also has New file…, Find in folder (⇧⌘F) and Mark as excluded. To make a folder, type a path in New file…, such as api/routes.py: the missing folders are created.

Excluded folders, such as node_modules, are left out of the tree, Open file and Find in files. Show them with the eye button. Right-click a folder and choose Mark as excluded to leave it out in this project, or Cancel exclusion to bring it back. The folders every project leaves out are in Settings › Files.

A file opens as a tab at the end of the tab row, next to your agents and shells. The tab’s title adds the copy’s name, such as store.py health-endpoint, unless the file is in your branch. A file that already has a tab opens in it.

To find a file by name, press ⇧⌘O (File › Open File…) and type part of its name or path. All copies also lists the file in your branch and other workspaces where it differs; ⇥ switches to This tab’s copy. Include excluded adds excluded folders; ⇧⌘O again flips it. Press ↵ to open, ⌥↵ to open a changed file in Review. Paste path:77 to open at line 77.

The editor saves by itself about a second after you stop typing; ⌘S saves at once. A tab with unsaved edits shows a dot. Closing a tab with ⌘W saves it first.

  • ⇥ and ⇧⇥ indent and outdent the selected lines; ↵ keeps the indentation. The project’s .editorconfig is followed.
  • The gutter marks the lines changed since the last commit; in a workspace, since your branch’s last commit. The strip on the right shows every change in the file: click a mark to jump there.
  • Right-click for Go to definition, Find…, Replace…, Open in Review and Copy path.

Code is highlighted for Python, Swift, JavaScript, TypeScript, Go, Rust, PHP, Ruby, Java, Kotlin, C, C++, C#, Shell, Lua, SQL, HTML, CSS, JSON, YAML, TOML, Markdown, Dockerfile, Makefile and .env.

The status bar shows the cursor’s line and column, the language, the encoding, line endings and indentation, and the language server. The editor reads and writes UTF-8 only. A binary file, a file in another encoding or one over 8 MB opens as a line that says why.

If the file changes on disk while its tab has no unsaved edits, the tab just reloads. If you were editing it, saving pauses and a yellow bar says who changed it and when:

  • Show difference opens Merge… with your version and the one on disk.
  • Take claude’s drops your edits.
  • Keep mine writes your version.

If the file was deleted, choose Keep mine or Close tab. If a save fails, a red bar says why; Try again (⌘S) saves again. Your edits stay in the tab either way.

Press ⌘F to find in the file, ⌘R to replace. ⌘G and ⇧⌘G go to the next and previous match; Esc closes the bar. Aa matches case (⌥C), W whole words (⌥W), .* a regular expression (⌥X). The replace row has Replace and Replace all.

A language server gives completion, go to definition and error marks. Drakkar finds the server on your shell PATH and in the Homebrew, npm, cargo and go folders. It never installs one itself.

A language server can run code from the project, so the first file that needs one asks: Start runs servers for every copy of this project, now and after a relaunch; Not now keeps them off until Drakkar starts again. The project’s Workspace settings show Language servers: allowed with Revoke.

The status bar shows the server of the open file, such as pyright:

Status bar Meaning
pyright · off Not started for this project. Click to allow and start.
pyright · starting Starting.
pyright · indexing Completion and go to definition work once indexing ends.
pyright Ready.
pyright not installed Click for a notice with the install command, Install in terminal and Copy command.
pyright · stopped Stopped to save memory: at most 4 servers run at once. Click to start.
pyright stopped Stopped on an error. Click to see why.
pyright crashed 5 times · Click to restart Click to start it again.

With a server running:

  • Completion opens as you type; ⌃Space opens it by hand. ↵ inserts, Esc closes.
  • Go to definition: hold ⌘ and click a name, or right-click and choose Go to definition. The definition opens in a tab.
  • Errors and warnings are underlined in red and yellow; hover to read the message. Unused code is faded, deprecated code struck through.

Settings › Languages lists every supported server and whether it is installed, with Install in terminal and Copy command for the missing ones. Open lsp.json opens the file where you override a server’s command.

Press ⇧⌘F (File › Find in Files…). It searches every file of the front tab’s copy, ignored files too, but not excluded folders.

Find in files open over the health-endpoint workspace: the query store, In project selected next to Directory and the copy health-endpoint, Include excluded off and Files all; the list of matches in app.py, store.py and test_app.py, the first selected; under it the preview of bookmarks/app.py at line 6 with store highlighted; the bottom line reads ↑↓ select · ↵ open in editor · ⌘↵ open in new tab · Esc close and 34 matches in 5 files
Each match shows its line, its file and the line number; the preview opens the file at the selected one.
  • In project searches the whole copy; Directory only one folder. Find in folder in the tree’s menu sets it for you.
  • Aa, W and .* work as in the find bar. Include excluded adds excluded folders. Files limits the search to a file type, such as *.py.
  • Move through the matches with ↑ ↓; the preview shows the file at the match.
  • ↵ opens the match in place of the current tab, if it has no unsaved edits; ⌘↵ in a new tab. Esc closes the panel.

Your branch and other workspaces are searched from their own tabs.

Markdown, SVG, CSV and TSV files have three views, switched by the icons at the top right of the editor or by ⌥⌘P (View › Preview): editor only, editor and preview side by side, preview only.

  • Markdown preview shows images from the project and opens links to its files in tabs. It loads nothing from the network.
  • CSV and TSV open as a table. Filter rows keeps the rows that contain the text; click a column header to sort. The status bar shows the size, the malformed rows (click to jump to the next one) and the delimiter (click to change it).
  • Pictures (PNG, JPEG, GIF, WebP, HEIC and others) and PDF open in a viewer. Zoom with ⌘+, ⌘-, ⌘0 to fit, a pinch, or the buttons at the top right.

While a merge or rebase is stopped, a file with conflict markers shows a yellow bar, such as Merge in progress · 2 conflicts in this file. Click Merge…: both versions stand on the sides, the Result in the middle.

  • » Left, « Right and »« All take the changes that don’t conflict from one side or both; Resolve simple settles the easy conflicts.
  • For each change, accept it into the result or Ignore it. Or take a whole side with Accept Left or Accept Right.
  • Edit the result by hand if needed, then click Apply (⌘↵).

To finish the merge or rebase, see Git.

  • Settings › Files: folders left out in every project, and those you excluded in each one.
  • Settings › Languages: language servers and their install commands.
  • Settings › Keymap: the shortcuts below.
Keys Action
⇧⌘E Show or hide Files
⇧⌘O Open file
⇧⌘F Find in files
⌘F / ⌘R Find / replace in the file
⌘G / ⇧⌘G Next / previous match
⌥C ⌥W ⌥X Match case, whole words, regex
⌘S Save now
⌃Space Completion
⌥⌘P Editor, split, preview
⌘C / ⇧⌘C Copy path / @path, in the tree
⇧F6 Rename, in the tree
⌘⌫ Delete, in the tree
⌥⌘R Reveal in Finder, in the tree
⌘+ / ⌘- Expand / collapse all; zoom a picture
⌘0 Fit a picture