Editor and file views
The editor sits between the explorer and the terminals. It edits code, and it shows images, PDFs, Markdown, HTML, LaTeX and notebooks as what they are. One table decides what a file is, so the editor, a review and the attachment viewer always agree about it.
Tabs
Open files line up on the tab strip. Drag a tab to reorder it. Click its x to close it, or press Ctrl and W to close the active one. Double-click a tab to flip a file between its source and its rendered view, where the file has both. With nothing open the pane reads no file open.
The status bar along the bottom names the language of the active file on the left. On the right it names the language and runtime Warshall detected for the project.
Editing
- Changes save by themselves a moment after you stop typing. Ctrl and S writes them at once.
- Tab inserts the indent the file's language uses. Enter carries the current line's indentation onto the next line.
- A JSON or SVG file written on a single line opens laid out over several lines so you can read it. The file on disk only changes if you edit it.
- A file the editor cannot show as text opens read only with a note in place of its contents. Binary file means the file is not text. File is too large to display means a text file over 2 MB, or a notebook over 48 MB.
Find and go to line
Ctrl and F opens the find strip over a file shown as text. It counts the matches as you type, for example 3 of 12, or reads no results. Aa turns on match case, and the arrows step to the previous and next match.
- Enter or F3 goes to the next match.
- Shift and Enter, or Shift and F3, goes to the previous one.
- Escape closes the strip.
Ctrl and G opens Go to line. Type a line number and press Enter. The editor scrolls there, puts the cursor at the start of that line and flashes it.
Both keys also work from the explorer and the tab strip, as long as the cursor is not in another text field. Switching files closes the strip and keeps what you searched for.
Jumping to symbols
Hold Ctrl and the names in the file turn into links. Ctrl and click a name to jump to where it is declared. Clicking the declaration itself lists the places the name is used instead.
With one answer the editor goes straight there. With several, a picker opens with the file, the line and a preview of each one. Pick with the arrow keys and Enter, or click. Escape closes it. When nothing is found a short note appears by the pointer, either Cannot find declaration to go to or No usages of 'name' found.
What each file opens as
| File | Opens as |
|---|---|
| png, jpg, jpeg, gif, webp, bmp, ico, avif | The image. |
| The document, in the in-app PDF viewer. | |
| svg | The image. Double-click the tab for the source. |
| md, markdown | The source. Double-click the tab for the rendered document. |
| html, htm, xhtml | The source. Double-click the tab for the page. |
| tex, latex, ltx | The source. Double-click the tab for the compiled PDF. |
| ipynb | The notebook, cell by cell. |
| docx | A binary file in the editor. A review and the attachment viewer show the document itself. |
| Everything else | The source, as text. |
Each open tab keeps its own choice of source or rendered view. An image or PDF over 25 MB reads File is too large to preview.
Markdown
The rendered view has a zoom control in its corner that goes from 60% to 200%. It starts at 120% and keeps the last level you set. Images written as relative paths load from the document's own folder.
HTML
An HTML file flips to the page it describes, shown in a locked frame. Scripts are removed and forms do not submit. Images and stylesheets beside the document are loaded. Anything the page pulls from the internet is not. The page keeps its own look.
LaTeX
A .tex file flips to the PDF a real TeX engine makes of it, shown in the same viewer every PDF opens in. Nothing about the document is approximated.
- The engine is a TeX already on your PATH, such as tectonic, latexmk, pdflatex, xelatex or lualatex, or the Tectonic that Warshall installs for you. With no TeX on the machine, asking for the rendered view is the ask to install one. The view reads Installing LaTeX engine…, Tectonic is downloaded once into the data folder, and the view compiles as soon as it lands. There is no separate install button.
- A failed download reads no LaTeX engine with the reason and a Retry. With Tectonic, the first compile also fetches the packages the document needs, which can take a minute or two.
- A compile runs in the document's own folder, so included files and figures resolve the way they do for you. Every output goes to the data folder. Nothing is written into your project.
- The engine keeps going past errors it can recover from, so a document with a package clash still gets pages. Only a document that produced no PDF at all reads as failed, and then the end of the engine's log is shown. A compile that hangs is stopped after 10 minutes.
- With a .tex tab active the tab strip carries Export PDF. It compiles, asks where the PDF should go and copies it there. It reads Exporting… while it works and Export failed if it cannot finish.
Notebooks
An .ipynb file always opens as a notebook. Code cells run on a Jupyter kernel started from a Python on your machine, so outputs, errors, input() prompts and rich displays are the kernel's own.
The toolbar holds + Code, + Text, Run all, Interrupt and Restart. At its right end the kernel menu shows the Python in use and the kernel's state, which is Not started, Starting, Idle, Busy, Restarting or Kernel died. The menu lists the Pythons found on the machine and in the project's virtual environment folders. The one you pick is remembered for the project.
A Python without the kernel package is marked ipykernel not installed, and the toolbar offers Install ipykernel. The kernel starts when you first run a cell.
| Key | What it does |
|---|---|
| Shift and Enter | Runs the cell and moves to the next one. |
| Ctrl and Enter | Runs the cell and stays on it. |
| Alt and Enter | Runs the cell and inserts a new one below. |
| Escape | Leaves the cell you are typing in. |
| Enter | Starts editing the selected cell. |
| Up and Down | Select the cell above or below. |
| A or B | Inserts a cell above or below the selected one. |
| M or Y | Turns the selected cell into text or into code. |
| D twice | Deletes the selected cell. |
Each cell also has controls to move it up or down and to delete it. The notebook is saved in the notebook format with its outputs and execution counts, the way JupyterLab saves it. A kernel keeps running when you close the tab and open it again, and every kernel stops when the app closes. A review shows the same cells, read only.
The editor profile
Each project has an editor profile. Auto picks one from the project's build and dependency files, such as package.json, pyproject.toml or pom.xml. To pin one, open Settings, go to the Projects tab and choose Default, JavaScript, Python or Java under Editor profile.
The profile does not change how the editor looks. Colors follow the file's language and your code theme, the same in every project. What the profile changes is the explorer's right-click menu. The Java profile puts a New submenu with Java Class, Package and File at the top. The other profiles start with Open.
Files that change on disk
When the open file changes on disk, because an agent, git or another program wrote it, the editor reads it again. The one exception is a buffer holding an edit that has not saved yet. That edit is the newer version, so it is kept and saved. Images and PDFs reload the same way.
Fonts and colors
The Appearance tab in Settings holds the code theme and the mono font, each with a live preview. See Settings.