sdeditpreview
Chapters

3 / 9 · Applies to v0.1.3

Editor and files

Opening and saving, language features, search and replace, conflicts, and unsaved work.

Open and save#

  • Cmd/Ctrl+P opens a file by name or path, listing recent files when the box is empty. src/main.ts:42:5 jumps to a line and column.
  • Cmd/Ctrl+N creates an untitled file.
  • Cmd/Ctrl+S saves, Cmd/Ctrl+Shift+S saves as, and Cmd/Ctrl+Alt+S saves all.
  • Auto save can be off, on focus change, or after a delay (1.5 s). It is off by default.
  • Enable trimming trailing whitespace, inserting a final newline, and TS / JS formatting on save in Settings.

Editing#

  • Find in file Cmd/Ctrl+F, go to line Ctrl+G, duplicate line Cmd/Ctrl+Shift+D, toggle wrapping Alt+Z
  • Zoom the editor font in, out, or reset with Cmd/Ctrl+= / Cmd/Ctrl+- / Cmd/Ctrl+0
  • .editorconfig is applied. The status bar switches indentation, line ending (LF / CRLF / CR), and language mode by hand. Mixed line endings are normalized on save.
  • Syntax highlighting for common languages (including PHP, SCSS / Sass, Vue, Svelte, C#, Swift, and Kotlin), colored bracket pairs, and toggleable indent guides
  • Explorer supports drag-and-drop move as well as cut, copy, and paste from the context menu (open tabs follow moved paths).
  • The editor context menu includes undo, redo, find, go to line, toggle line comment, copying a path or “path:line”, and showing Git changes.

TypeScript and JavaScript#

Besides diagnostics, completion with auto-imports, hover, and signature help:

ActionKey
Quick fixCmd/Ctrl+.
Go to definitionF12
Find referencesShift+F12
Rename symbol (preview before applying)F2
Format documentAlt+Shift+F

The Problems tab lists diagnostics and opens each location. Source files over 1 MiB and dependency type definitions over 4 MiB are not analyzed; the tab then says Partial results. Diagnostics and completion for other languages (LSP) are not supported.

Cmd/Ctrl+Shift+F searches the workspace with case, whole-word, and regular expression options, plus include and exclude patterns such as src/**, *.ts.

To replace, enable Replace, check Preview Replacements, then choose Apply Replacements.

Files excluded by .gitignore and the .git directory are not searched, nor are binary files or files over 1 MiB. Results stop at 500 matches.

Markdown, images, and large files#

  • Markdown has Source, Split, and Preview modes.
  • PNG, JPEG, GIF, WebP, BMP, ICO, and AVIF images up to 10 MiB open in a zoomable tab. SVG image preview is not supported.
  • UTF-8 text over 1 MiB shows the first 1 MiB, read-only.

External edits and conflicts#

When an agent rewrites a file and you have no unsaved changes, it reloads and keeps the cursor position.

With unsaved changes, nothing is overwritten. These buttons appear:

ButtonWhat it does
Compare with DiskShows the file on disk next to your edits.
Save a Copy…Saves your edits to another file. The tab keeps them.
Replace or Re-create File…After confirmation, writes your edits over the file, or re-creates a deleted file.
Reload from DiskAfter confirmation, discards your edits and loads the file.

Protecting unsaved work#

When you quit normally or switch folders, sdedit asks whether to save or discard unsaved files.

In case of a forced quit or crash, edits (including untitled files) are backed up temporarily (Hot Exit). They return the next time you open the workspace, and a conflict is shown if a file changed on disk.

Not backed up: content over about 512 KiB is skipped with a warning in the editor. Only the 20 most recent files are kept. Save anything important.

Report a mistake in this manual