Skip to content

Files and the editor ​

The Files tool window (Ctrl Shift E) shows the project's folders as a tree, and files open in a Monaco editor in tabs beside the chats.

The tree ​

Files carry their git status. Excluded files (ignored by git, or excluded by you) are dimmed.

View options in the header:

  • show or hide excluded files and dotfiles,
  • put folders that hold only one folder on a single row (src/main/java),
  • sort by name or file type, and keep folders on top or not,
  • keep the open file selected. The target button selects it once.

Show in Files finds a file even when it is hidden.

File actions ​

Right-click a file or folder (or the empty space and the header, for the project folder itself) to:

  • create a file or folder,
  • rename (F2). Renaming never replaces anything, and open tabs follow it with their unsaved edits,
  • duplicate a file,
  • show it in Explorer, Finder or the file manager, or open a terminal there,
  • copy its path, or its path relative to the project,
  • exclude it from the tree. Exclusions are kept per project, shared by its worktrees, and only change this tree: agents and git still see the files,
  • delete it (Del, ⌘ ⌫ on a Mac).

Delete asks first and moves to the Recycle Bin or Trash. What the trash cannot take (too large, too deep, a drive without one), and anything in a remote project, which has no trash, is deleted for good only after you confirm exactly that.

Opening files ​

A click previews a file in a tab (the next click replaces it); a double-click or an edit keeps the tab.

  • Pictures (PNG, JPEG, GIF, WebP, AVIF, BMP, ICO) open in a viewer that fits them to the pane and zooms (buttons, Ctrl + wheel, + / - / 0).
  • SVG files open as a picture with a Preview / Code switch; the preview follows unsaved edits.
  • Other binary files, and text files over 5 MB, are not opened.

Saving ​

Files save themselves as you work: when you pause typing, switch tabs or windows, close a tab or window, and before agents and git use them. Turn it off in Settings > Editor; Ctrl S always saves.

Mango asks before closing a tab only when it can't save it (or, with automatic saving off, whenever it has unsaved edits). If a file changes on disk while you edit it (an agent, the terminal), saving stops and asks whether to discard your edits or overwrite the file.

Changes in the gutter ​

The gutter marks what changed since the last commit, as you type: a green bar for added lines, the modified colour for changed ones, a red wedge where lines were removed, and the same marks on the scrollbar. Click a mark to see the committed lines and Revert them; undo brings your edit back.

Completion and language servers ​

Completion works as you type in every project, remote ones too, from each language's keywords, the words in the project's open files, and paths.

For projects on this computer, Mango can also use language servers for TypeScript and JavaScript, Vue, Rust, Python, Go, C and C++, and C#:

  • type-aware completion with automatic imports,
  • documentation on hover and parameter hints,
  • errors,
  • colours for what each name is (types, methods, constants, as the server knows them),
  • go to definition (F12, or Ctrl + click) within the project. In C#, Unity projects included, going to a type from a compiled library (UnityEngine, a NuGet package, .NET itself) opens the source the server decompiles, read-only, in a tab of its own.

In a Vue single-file component (.vue) this covers both halves: the script, and the template's tags, attributes and expressions, Nuxt's auto-imports included. It takes two servers, the Vue server for the template and the TypeScript server, which reads .vue files through the Vue server's plugin; installing the Vue server from Settings > Editor installs both. Without them, a .vue file is still highlighted: TypeScript or JavaScript in the script, CSS, SCSS or Less in the style, and the template's expressions.

Without a language server, go to definition works within the file. Rename (F2) works within the file too, and refuses names that are exported or are members other files could use.

Asking first ​

Language servers can run a project's own code (build scripts, plugins), so Mango asks once per project before starting one, and remembers the answer for that folder.

  • Another folder at the same path (deleted and cloned again), or a project you removed and added back, asks again.
  • A git worktree Mango makes for a chat follows its project's answer. Any other worktree follows a no and asks once where the project said yes.
  • A folder's own no always stands.

A server starts with the first file that needs it and keeps running while its project is open in the window. It hears about files created, changed, renamed or deleted on disk (by an agent, a terminal, Unity, a checkout) as they happen.

Settings > Editor shows which servers are installed, runs their installers in a terminal you watch, and turns them off altogether. It also turns off the gliding caret (reduced motion does too).

Mango 0.21.0