[{"data":1,"prerenderedAt":46},["ShallowReactive",2],{"doc:en:editor":3},{"title":4,"lede":5,"html":6,"headings":7},"The built-in editor","The built-in editor lets you browse and edit the files of a project or of an agent’s worktree without leaving Escouade, with syntax highlighting, search, code navigation and change tracking.","\u003Cp>\u003Cimg src=\"\u002Fimages\u002Fen\u002Feditor.jpg\" alt=\"The editor on an agent’s worktree: the file tree with the changed files, tabs, the text with its changed lines marked in the margin, and the search bar\" width=\"1920\" height=\"960\" loading=\"lazy\" decoding=\"async\">\u003C\u002Fp>\n\u003Ch2 id=\"opening-the-editor\">Opening the editor\u003C\u002Fh2>\n\u003Cp>The editor takes the place of the conversation in the main area. The “← Conversation” button at the top left goes back. Open tabs and unfolded folders are kept, project by project, as long as Escouade runs: when you return to the editor, you find what you left there.\u003C\u002Fp>\n\u003Cdiv class=\"table\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>To open…\u003C\u002Fth>\n\u003Cth>Do this\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>The editor of the displayed agent\u003C\u002Ftd>\n\u003Ctd>The “Editor” button in the conversation’s header (“Browse and edit the files of this agent”), or “Open in editor” in the menu of the agent’s card. It opens on its worktree, or on the project if it has none.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>The project’s editor\u003C\u002Ftd>\n\u003Ctd>The “Editor” button at the top right of the title bar, or “Browse” at the foot of the sidebar.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A changed file\u003C\u002Ftd>\n\u003Ctd>The \u003Ccode class=\"key\">&lt;\u002F&gt;\u003C\u002Fcode> button on a row of the \u003Ca href=\"\u002Fen\u002Fdocs\u002Fgit\u002F\">uncommitted files panel\u003C\u002Fa>, or “Open in editor” in its menu.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A file the agent edited\u003C\u002Ftd>\n\u003Ctd>The file name on a tool call row (Edit, Write…) in the conversation: the editor opens at the first line that edit changed. The list of changed files that wraps up the end of a turn does the same, without a specific line.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A file you know by name\u003C\u002Ftd>\n\u003Ctd>\u003Ccode class=\"key\">Ctrl+P\u003C\u002Fcode>, see \u003Ca href=\"#opening-a-file-by-name\">below\u003C\u002Fa>.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>On macOS, \u003Ccode class=\"key\">Ctrl\u003C\u002Fcode> becomes \u003Ccode class=\"key\">⌘\u003C\u002Fcode> in this page’s shortcuts, except for going back and forward (see \u003Ca href=\"#going-to-a-definition\">below\u003C\u002Fa>). A file that is outside the project folder, or the agent’s, doesn’t open: a message says so. When a source opens with no tab at all, the editor shows its first changed file, or else its \u003Ccode class=\"key\">README.md\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"the-source-the-project-or-an-agent-s-worktree\">The source: the project or an agent’s worktree\u003C\u002Fh2>\n\u003Cp>The button at the top left of the editor, next to “← Conversation”, says what you are browsing: “⎇ main” with the “branch” tag for the project folder, or an agent’s name with the “worktree” tag. It opens a “Browse” menu:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>the project, with its branch and its path, and the number of its changed files (“Δ 3”) or “clean”;\u003C\u002Fli>\n\u003Cli>each agent that has a \u003Ca href=\"\u002Fen\u002Fdocs\u002Fworktrees\u002F\">worktree\u003C\u002Fa>, with its status dot, its path, its model and the number of its changes (“4 changes”) or “clean”.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Each source has its own tabs, its own unfolded folders and its own file tree. Files are read and written directly on disk: what you save in an agent’s worktree is what it will see when it reads that file. The bar under the text recalls the source (“worktree · refacto-auth” or “branch · main”).\u003C\u002Fp>\n\u003Ch2 id=\"the-file-tree\">The file tree\u003C\u002Fh2>\n\u003Cp>The left column shows the source’s files: those git lists, tracked or new and not ignored. Folders like \u003Ccode class=\"key\">node_modules\u003C\u002Fcode>, which git ignores, aren’t there, and neither are the agents’ worktrees when they are stored inside the project folder. It goes up to 50,000 files; beyond that, the header says “list truncated”.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>The header gives the source’s path and a summary (“128 files · 3 changes”). The buttons on the “Files” row create a file or a folder (“New file”, “New folder”) in the folder of the row you last clicked (otherwise the displayed file’s folder, or the root), “Refresh” reads the tree again and “Collapse all” folds the folders. It also updates by itself shortly after each change in the folder, for example when the agent writes a file.\u003C\u002Fli>\n\u003Cli>A modified, added or deleted file takes the color of its state and its letter (\u003Ccode class=\"key\">M\u003C\u002Fcode>, \u003Ccode class=\"key\">A\u003C\u002Fcode>, \u003Ccode class=\"key\">D\u003C\u002Fcode>); a folder that contains one carries a dot of the same color. The tabs take the file’s color.\u003C\u002Fli>\n\u003Cli>The files that git ignores but that the project copies into its worktrees (\u003Ccode class=\"key\">.env*\u003C\u002Fcode> by default) are in the tree, greyed out, with the tooltip “Ignored by git”: see \u003Ca href=\"\u002Fen\u002Fdocs\u002Fworktrees\u002F\">worktrees\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>The handle between the column and the text sets the column’s width, with the keyboard as well as the mouse; a double-click puts it back to its original width. The width applies to all projects.\u003C\u002Fli>\n\u003Cli>The keyboard follows the rules of trees: \u003Ccode class=\"key\">↑\u003C\u002Fcode> and \u003Ccode class=\"key\">↓\u003C\u002Fcode>, \u003Ccode class=\"key\">Home\u003C\u002Fcode> and \u003Ccode class=\"key\">End\u003C\u002Fcode> move, \u003Ccode class=\"key\">→\u003C\u002Fcode> unfolds a folder or goes into it, \u003Ccode class=\"key\">←\u003C\u002Fcode> folds it or goes up to the parent folder, \u003Ccode class=\"key\">Enter\u003C\u002Fcode> opens a file, \u003Ccode class=\"key\">F2\u003C\u002Fcode> renames and \u003Ccode class=\"key\">Del\u003C\u002Fcode> deletes (\u003Ccode class=\"key\">⌘⌫\u003C\u002Fcode> on macOS).\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"the-file-tree-s-menu\">The file tree’s menu\u003C\u002Fh3>\n\u003Cp>Right-clicking a row, or the free space under the rows, opens a menu:\u003C\u002Fp>\n\u003Cdiv class=\"table\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Entry\u003C\u002Fth>\n\u003Cth>What it does\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>“New file…”\u003C\u002Ftd>\n\u003Ctd>Opens a name field in the row’s folder (the root on the free space). A name like \u003Ccode class=\"key\">src\u002Flib\u002Fa.ts\u003C\u002Fcode> also creates the missing folders.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>“New folder…”\u003C\u002Ftd>\n\u003Ctd>The same for a folder. Git doesn’t list an empty folder: the tree shows it all the same.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>“Open a terminal here”\u003C\u002Ftd>\n\u003Ctd>Opens a \u003Ca href=\"\u002Fen\u002Fdocs\u002Fterminals\u002F\">terminal\u003C\u002Fa> in that folder of the source.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>“Rename…” (\u003Ccode class=\"key\">F2\u003C\u002Fcode>)\u003C\u002Ftd>\n\u003Ctd>Replaces the row with a field. A name like \u003Ccode class=\"key\">other\u002Fa.ts\u003C\u002Fcode> moves the file. Open tabs follow.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>“Delete” (\u003Ccode class=\"key\">Del\u003C\u002Fcode>, \u003Ccode class=\"key\">⌘⌫\u003C\u002Fcode> on macOS)\u003C\u002Ftd>\n\u003Ctd>Sends the file or folder to the trash after confirmation (“It goes to the trash.”; for a folder, “The folder and its 12 files go to the trash.”).\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>“Copy path” and “Copy relative path”\u003C\u002Ftd>\n\u003Ctd>Copy the full path, or the path from the source’s root.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>The name field refuses what can’t exist and says so under the row: a name that starts with a slash, an invalid name, a name already taken (“a.ts” already exists here.) or a folder you try to put inside itself. If the file you create is ignored by git, a message says so (“.env.local is ignored by git: the file tree doesn’t show it.”).\u003C\u002Fp>\n\u003Cp>Deleting a folder or a file whose files are open with unsaved changes first asks, for each one, whether to save it. Renaming loses nothing: the open tabs, changes included, follow the new name.\u003C\u002Fp>\n\u003Ch2 id=\"tabs-and-saving\">Tabs and saving\u003C\u002Fh2>\n\u003Cp>Clicking a file opens it in a tab. A tab’s × button closes it, as does a middle click; a dot replaces the cross when the file has unsaved changes. Two tabs with the same name carry the name of their folder to tell them apart.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>At the top right, “● Unsaved · Ctrl+S” or “Saved” says where the displayed file stands, and the “Save” button saves it. \u003Ccode class=\"key\">Ctrl+S\u003C\u002Fcode> does the same.\u003C\u002Fli>\n\u003Cli>Saving keeps the file’s line endings (LF or CRLF) and its BOM, and the write is atomic: a file is never written halfway. A read-only file is refused.\u003C\u002Fli>\n\u003Cli>Closing a tab that has changes asks “Save “a.ts”?” with “Save”, “Don’t save” and “Cancel”; closing Escouade’s window with unsaved files asks “Quit Escouade?” (“Quit anyway”).\u003C\u002Fli>\n\u003Cli>A binary file isn’t displayed (“Binary file: no preview.”), nor is a file larger than 2 MB (“File too large for the editor (2.4 MB).”).\u003C\u002Fli>\n\u003Cli>The bar under the text gives the cursor’s line and column (“Ln 9, Col 22”), the language, the encoding (UTF-8), the line endings and the file’s indentation (“Spaces: 2” or “Tabs”), which the editor works out from the file.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"the-text\">The text\u003C\u002Fh2>\n\u003Cp>Syntax highlighting follows the file’s extension. A file of another type is shown as “Plain text”.\u003C\u002Fp>\n\u003Cdiv class=\"table\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Language\u003C\u002Fth>\n\u003Cth>Extensions\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>TypeScript, JavaScript\u003C\u002Ftd>\n\u003Ctd>\u003Ccode class=\"key\">.ts\u003C\u002Fcode>, \u003Ccode class=\"key\">.mts\u003C\u002Fcode>, \u003Ccode class=\"key\">.cts\u003C\u002Fcode>, \u003Ccode class=\"key\">.tsx\u003C\u002Fcode>, \u003Ccode class=\"key\">.js\u003C\u002Fcode>, \u003Ccode class=\"key\">.mjs\u003C\u002Fcode>, \u003Ccode class=\"key\">.cjs\u003C\u002Fcode>, \u003Ccode class=\"key\">.jsx\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Web\u003C\u002Ftd>\n\u003Ctd>\u003Ccode class=\"key\">.html\u003C\u002Fcode>, \u003Ccode class=\"key\">.css\u003C\u002Fcode>, \u003Ccode class=\"key\">.scss\u003C\u002Fcode>, \u003Ccode class=\"key\">.svelte\u003C\u002Fcode>, \u003Ccode class=\"key\">.vue\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Data and configuration\u003C\u002Ftd>\n\u003Ctd>\u003Ccode class=\"key\">.json\u003C\u002Fcode>, \u003Ccode class=\"key\">.yaml\u003C\u002Fcode>, \u003Ccode class=\"key\">.yml\u003C\u002Fcode>, \u003Ccode class=\"key\">.toml\u003C\u002Fcode>, \u003Ccode class=\"key\">.xml\u003C\u002Fcode>, \u003Ccode class=\"key\">.svg\u003C\u002Fcode>, \u003Ccode class=\"key\">.sql\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Documents\u003C\u002Ftd>\n\u003Ctd>\u003Ccode class=\"key\">.md\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Compiled languages\u003C\u002Ftd>\n\u003Ctd>\u003Ccode class=\"key\">.rs\u003C\u002Fcode>, \u003Ccode class=\"key\">.go\u003C\u002Fcode>, \u003Ccode class=\"key\">.java\u003C\u002Fcode>, \u003Ccode class=\"key\">.c\u003C\u002Fcode>, \u003Ccode class=\"key\">.h\u003C\u002Fcode>, \u003Ccode class=\"key\">.cpp\u003C\u002Fcode>, \u003Ccode class=\"key\">.hpp\u003C\u002Fcode>, \u003Ccode class=\"key\">.cc\u003C\u002Fcode>, \u003Ccode class=\"key\">.cs\u003C\u002Fcode>, \u003Ccode class=\"key\">.kt\u003C\u002Fcode>, \u003Ccode class=\"key\">.swift\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Scripts\u003C\u002Ftd>\n\u003Ctd>\u003Ccode class=\"key\">.py\u003C\u002Fcode>, \u003Ccode class=\"key\">.rb\u003C\u002Fcode>, \u003Ccode class=\"key\">.php\u003C\u002Fcode>, \u003Ccode class=\"key\">.sh\u003C\u002Fcode>, \u003Ccode class=\"key\">.bash\u003C\u002Fcode>, \u003Ccode class=\"key\">.ps1\u003C\u002Fcode>, \u003Ccode class=\"key\">Dockerfile\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode class=\"key\">.prisma\u003C\u002Fcode> and \u003Ccode class=\"key\">.tf\u003C\u002Fcode> files are recognized, but without highlighting.\u003C\u002Fp>\n\u003Cp>The editor has what you expect from a code editor: line numbers, the current line marked, brackets matched and closed automatically, indentation that follows what you type, \u003Ccode class=\"key\">Tab\u003C\u002Fcode> to indent and \u003Ccode class=\"key\">Ctrl+Z\u003C\u002Fcode> to undo.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode class=\"key\">Alt+click\u003C\u002Fcode> (\u003Ccode class=\"key\">⌥+click\u003C\u002Fcode> on macOS) adds a cursor.\u003C\u002Fli>\n\u003Cli>\u003Ccode class=\"key\">Ctrl+F\u003C\u002Fcode> opens the search bar for the file, at the top of the text: “next”, “previous”, “all”, and the options “match case”, “by word” and “regexp”, with the “Replace” field, “replace” and “replace all”. \u003Ccode class=\"key\">Esc\u003C\u002Fcode> closes it.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"changed-lines\">Changed lines\u003C\u002Fh3>\n\u003Cp>In the margin, next to the line numbers, a colored bar marks the lines changed since the file’s reference version, and a mark shows where lines have disappeared. The reference version is the one from the last commit. For an agent’s worktree, it is the one where its branch left its base branch: the agent’s commits then count as changes.\u003C\u002Fp>\n\u003Cp>Above the text, the file’s path is followed by a summary: “5 lines changed vs main”, “New file · not in main” or “Same as main”. In the project folder, the reference is written “HEAD”.\u003C\u002Fp>\n\u003Cp>The “Show changes” button (visible when the file has a reference version) displays those changes in the text: above each changed block, the lines of the reference version, with a “Revert this block” button that puts them back in the text. That changes the text without saving it: \u003Ccode class=\"key\">Ctrl+Z\u003C\u002Fcode> undoes it, and nothing is written until you save. A second click on the button closes the comparison.\u003C\u002Fp>\n\u003Ch2 id=\"when-a-file-changes-on-disk\">When a file changes on disk\u003C\u002Fh2>\n\u003Cp>As long as the editor is open, it reads the open files again at each change in the folder, for example when the agent works.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>A file you haven’t modified takes the new version by itself, without moving the cursor.\u003C\u002Fli>\n\u003Cli>A file you have modified doesn’t change under your fingers: a banner appears, “This file changed on disk.”, with three buttons.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cdiv class=\"table\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Button\u003C\u002Fth>\n\u003Cth>Effect\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>“Reload”\u003C\u002Ftd>\n\u003Ctd>Drops your changes and takes the version on disk.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>“Compare”\u003C\u002Ftd>\n\u003Ctd>Shows in the text what the disk has that’s different: above each block, the disk’s lines, with “Take this block”. The banner says “Comparing with the version on disk.”\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>“Keep my version”\u003C\u002Ftd>\n\u003Ctd>Saves your version over the one on disk.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>If the file changes again while you compare it, the banner says so (“The file changed on disk again: the comparison shows its new version.”) and “Keep my version” waits for a second: a click aimed at the previous version doesn’t overwrite the new one. A save is refused as long as the file has changed on disk since you read it: you never overwrite the agent’s work without having seen it.\u003C\u002Fp>\n\u003Cp>If the file is deleted, the banner says “This file was deleted.”, with “Close” and “Save to recreate it”.\u003C\u002Fp>\n\u003Ch2 id=\"going-to-a-definition\">Going to a definition\u003C\u002Fh2>\n\u003Cp>With \u003Ccode class=\"key\">Ctrl\u003C\u002Fcode> held down (\u003Ccode class=\"key\">⌘\u003C\u002Fcode> on macOS), what leads elsewhere is underlined under the mouse, with a hand, and a click follows it. \u003Ccode class=\"key\">F12\u003C\u002Fcode> follows what is under the text cursor. There is no language server: Escouade uses the source’s file tree, the file’s syntax and a search in the files.\u003C\u002Fp>\n\u003Cdiv class=\"table\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Under the cursor\u003C\u002Fth>\n\u003Cth>Where it leads\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>A script import (\u003Ccode>from '…'\u003C\u002Fcode>, \u003Ccode>import '…'\u003C\u002Fcode>, \u003Ccode class=\"key\">import('…')\u003C\u002Fcode>, \u003Ccode class=\"key\">require('…')\u003C\u002Fcode>) in a JavaScript, TypeScript, Svelte or Vue file\u003C\u002Ftd>\n\u003Ctd>The imported file. Extensions, \u003Ccode class=\"key\">index\u003C\u002Fcode> folders and the TypeScript source of a \u003Ccode class=\"key\">.js\u003C\u002Fcode> are found, and the aliases of \u003Ccode class=\"key\">tsconfig.json\u003C\u002Fcode> or \u003Ccode class=\"key\">jsconfig.json\u003C\u002Fcode> (\u003Ccode class=\"key\">paths\u003C\u002Fcode>, \u003Ccode class=\"key\">baseUrl\u003C\u002Fcode>) and SvelteKit’s \u003Ccode class=\"key\">$lib\u003C\u002Fcode> are followed. A package (\u003Ccode class=\"key\">node_modules\u003C\u002Fcode>) leads nowhere.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode class=\"key\">@import\u003C\u002Fcode>, \u003Ccode class=\"key\">@use\u003C\u002Fcode>, \u003Ccode class=\"key\">@forward\u003C\u002Fcode> or \u003Ccode class=\"key\">url(…)\u003C\u002Fcode> in a style sheet, an HTML, Svelte or Vue file\u003C\u002Ftd>\n\u003Ctd>The file (Sass partials \u003Ccode class=\"key\">_x.scss\u003C\u002Fcode> are found).\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>mod x;\u003C\u002Fcode> in a Rust file\u003C\u002Ftd>\n\u003Ctd>\u003Ccode class=\"key\">x.rs\u003C\u002Fcode> or \u003Ccode class=\"key\">x\u002Fmod.rs\u003C\u002Fcode>.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>from a.b import c\u003C\u002Fcode> or \u003Ccode>import a.b\u003C\u002Fcode> in a Python file\u003C\u002Ftd>\n\u003Ctd>The module’s file, relative imports included.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A relative link, \u003Ccode class=\"key\">src\u003C\u002Fcode> or \u003Ccode class=\"key\">href\u003C\u002Fcode> in a Markdown or HTML file\u003C\u002Ftd>\n\u003Ctd>The file.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A path written anywhere that exists in the source (\u003Ccode class=\"key\">src\u002Fapp.ts\u003C\u002Fcode>, \u003Ccode class=\"key\">.\u002Fa.ts\u003C\u002Fcode>), optionally followed by \u003Ccode class=\"key\">:42\u003C\u002Fcode> or \u003Ccode class=\"key\">:42:7\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>The file, at that line and column.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A name (variable, function, class, type…)\u003C\u002Ftd>\n\u003Ctd>Its definition: in the file, by its syntax, nearest to the cursor; in the file it is imported from; otherwise in the files of the same language, where a search finds what declares it. Nothing in a comment, a string or a keyword, nor in a Markdown or text file.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>A single destination opens right away. If there are several, a “Definitions of “name”” list opens under the word: \u003Ccode class=\"key\">↑\u003C\u002Fcode> and \u003Ccode class=\"key\">↓\u003C\u002Fcode> choose, \u003Ccode class=\"key\">Enter\u003C\u002Fcode> opens, \u003Ccode class=\"key\">Esc\u003C\u002Fcode> closes. With no result, a message says “No definition found for “name”.”; if the target file isn’t in the source, “File not found: …”.\u003C\u002Fp>\n\u003Cp>\u003Ccode class=\"key\">Shift+F12\u003C\u002Fcode> on a name looks for where it is used: the search in files opens on that name, whole word, case-sensitive. The text is searched as is, comments included.\u003C\u002Fp>\n\u003Ch3 id=\"going-back\">Going back\u003C\u002Fh3>\n\u003Cp>Each jump (a click, \u003Ccode class=\"key\">F12\u003C\u002Fcode>, a search result, a file opened with \u003Ccode class=\"key\">Ctrl+P\u003C\u002Fcode>) remembers where you left from. \u003Ccode class=\"key\">Alt+←\u003C\u002Fcode> goes back there and \u003Ccode class=\"key\">Alt+→\u003C\u002Fcode> goes forward again, as in a browser; the mouse’s “back” and “forward” buttons do the same. On macOS, they are \u003Ccode class=\"key\">⌃-\u003C\u002Fcode> and \u003Ccode class=\"key\">⌃⇧-\u003C\u002Fcode>, with the Control key and not \u003Ccode class=\"key\">⌘\u003C\u002Fcode>. The history keeps 50 places per project and per source.\u003C\u002Fp>\n\u003Ch2 id=\"opening-a-file-by-name\">Opening a file by name\u003C\u002Fh2>\n\u003Cp>\u003Ccode class=\"key\">Ctrl+P\u003C\u002Fcode> opens the “Open a file” palette from anywhere in a project, editor open or not. It searches the editor’s source if it is open, otherwise the displayed agent’s worktree, otherwise the project; the source’s name is at the right of the field.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>The field says “File name, or name:42 for a line”. Type part of the name, or just a few letters in order: the start of the name counts most, then a piece of the name, then the path.\u003C\u002Fli>\n\u003Cli>\u003Ccode class=\"key\">name:42\u003C\u002Fcode> opens the file at line 42, and \u003Ccode class=\"key\">name:42:7\u003C\u002Fcode> at line 42, column 7, like the errors in a stack trace (\u003Ccode class=\"key\">src\u002Fapp.ts:42:7\u003C\u002Fcode>).\u003C\u002Fli>\n\u003Cli>With an empty field, the list first shows the files opened last in that source (30 at most), without the one that is displayed: \u003Ccode class=\"key\">Enter\u003C\u002Fcode> therefore goes back to the previous file.\u003C\u002Fli>\n\u003Cli>The palette shows 50 results at most (“The first 50 results: narrow down your search.”). A file ignored by git carries the “ignored by git” tag. \u003Ccode class=\"key\">↑\u003C\u002Fcode> and \u003Ccode class=\"key\">↓\u003C\u002Fcode> choose, \u003Ccode class=\"key\">Enter\u003C\u002Fcode> opens, \u003Ccode class=\"key\">Esc\u003C\u002Fcode> closes.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"searching-in-files\">Searching in files\u003C\u002Fh2>\n\u003Cp>\u003Ccode class=\"key\">Ctrl+Shift+F\u003C\u002Fcode> opens the search through all the source’s files, in the left column; the magnifier above the file tree does the same, and the button next to it goes back to the files. If a single line of text is selected in the code, that is what gets searched. \u003Ccode class=\"key\">Ctrl+F\u003C\u002Fcode> remains the search in the displayed file.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>The “Search” field starts the search 250 ms after the last keystroke; \u003Ccode class=\"key\">Enter\u003C\u002Fcode> starts it at once. Three buttons set the search: “Match case” (\u003Ccode class=\"key\">Aa\u003C\u002Fcode>), “Whole word” (\u003Ccode class=\"key\">ab\u003C\u002Fcode>) and “Regular expression” (\u003Ccode class=\"key\">.*\u003C\u002Fcode>). An invalid expression is flagged (“Invalid regular expression.”).\u003C\u002Fli>\n\u003Cli>Escouade searches with \u003Ccode>git grep\u003C\u002Fcode> in the files git lists (tracked, or new and not ignored), without binary files, and without the agents’ worktrees when searching the project. The summary says “12 results in 3 files”.\u003C\u002Fli>\n\u003Cli>Results are grouped by file, with the number of lines found, and the matching part is highlighted. Clicking a line opens the file at that line and column. \u003Ccode class=\"key\">↑\u003C\u002Fcode> and \u003Ccode class=\"key\">↓\u003C\u002Fcode>, \u003Ccode class=\"key\">Home\u003C\u002Fcode> and \u003Ccode class=\"key\">End\u003C\u002Fcode> go through the list, \u003Ccode class=\"key\">→\u003C\u002Fcode> and \u003Ccode class=\"key\">←\u003C\u002Fcode> unfold and fold a file.\u003C\u002Fli>\n\u003Cli>Results stop at the first 2,000 lines (“Results limited to the first 2,000.”) or after 10 seconds (“Search stopped after 10 s: partial results.”).\u003C\u002Fli>\n\u003Cli>The search is kept when you close the editor, per project; when you change source, it starts again on the new one.\u003C\u002Fli>\n\u003C\u002Ful>\n",[8,12,15,18,22,25,28,31,34,37,40,43],{"id":9,"text":10,"depth":11},"opening-the-editor","Opening the editor",2,{"id":13,"text":14,"depth":11},"the-source-the-project-or-an-agent-s-worktree","The source: the project or an agent’s worktree",{"id":16,"text":17,"depth":11},"the-file-tree","The file tree",{"id":19,"text":20,"depth":21},"the-file-tree-s-menu","The file tree’s menu",3,{"id":23,"text":24,"depth":11},"tabs-and-saving","Tabs and saving",{"id":26,"text":27,"depth":11},"the-text","The text",{"id":29,"text":30,"depth":21},"changed-lines","Changed lines",{"id":32,"text":33,"depth":11},"when-a-file-changes-on-disk","When a file changes on disk",{"id":35,"text":36,"depth":11},"going-to-a-definition","Going to a definition",{"id":38,"text":39,"depth":21},"going-back","Going back",{"id":41,"text":42,"depth":11},"opening-a-file-by-name","Opening a file by name",{"id":44,"text":45,"depth":11},"searching-in-files","Searching in files",1791926756289]