Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ The goals, in order:
you get a heads-up; if the file is deleted, the tab is flagged once.
- **Toggleable, draggable sidebar** — show/hide the file tree from the
menu, or drag the splitter to resize it.
- **Terminal in a tab** — open your `$SHELL` in a real tab (`Esc \`` or
**Open terminal in new tab** from the`≡` menu) and run tests or git
without leaving the editor. Rendered by a built-in VT emulator, so it
works over SSH and inside `tmux` with no passthrough config.
- **Clipboard over SSH** — OSC 52, including a `tmux` passthrough so
copy works from inside a tmux session on a remote host.
- **Format on save** — opt-in per-project via `.spiceedit/format.json`
Expand Down Expand Up @@ -191,6 +195,8 @@ within half a second tap one of the letters below.
| `Esc /` | Toggle line comment |
| `Esc f` | Find in file |
| `Esc p` | Find file in project |
| `Esc F` | Find in files |
| `Esc \`` | Open terminal tab |

A lone `Esc` is harmless — if you don't follow it with a bound key
within the window, your next keystroke goes to the editor as normal,
Expand Down Expand Up @@ -250,6 +256,77 @@ fuzzy file finder over every non-ignored file in the project:
inside the editor.
- Only files are listed — no directories, no symlinked duplicates.

### Find in files

`Esc F` (`Esc` then `Shift+F`, or **Find in files** from the `≡`
menu) searches the *contents* of every non-ignored file in the
project — the VS Code "Find in Files" (`Ctrl+Shift+F`) gesture:

```
┌ Find in files esc ┐
│ main.go 42 │
│ main.go:3 func widget() {} │
│ internal/app/app.go:2 // a widget lives here │
│ ... │
└──────────────────────────────────────────────────────────┘
```

- Type a word — matching is **case-insensitive substring**, the same
as the in-file find. Each row is one match: `path:line` followed by
the source line, with the hit highlighted.
- `↑` / `↓` to move through matches, `Enter` to jump straight to the
match (opens the file and drops the cursor on it), `Esc` to dismiss.
Mouse hover highlights, click jumps, and the wheel scrolls the list.
- Shares the finder's index, so the scope is identical: it greps the
same `.gitignore`-honouring file set and never descends into
`node_modules`, `.git`, or vendored dumps.
- Binary files (detected by a NUL byte) and files larger than 2 MB are
skipped, so a stray asset or minified bundle can't stall a search.
- The grep runs on a background goroutine and results stream in as
they land, so typing stays responsive even on a large repo.

There's no regex, whole-word, or case-sensitive toggle in v1 — the
common case is "which files mention this word — take me there."

## Terminal tabs

`Esc \`` (or **Open terminal in new tab** from the`≡` menu) opens your
`$SHELL` in a new tab, so you can run tests, `git`, or anything else
without dropping the editor or reaching for a second tmux pane.

The terminal starts in the folder you're currently working in (the
selected file's directory, falling back to the project root), so
relative commands land where you expect.

It's a real terminal, not a log pane: SpiceEdit embeds a VT emulator and
paints the shell's screen into the tab, so `Ctrl+C`, colours, and
full-screen programs all behave. Because the editor owns the emulation,
none of it leaks into your host terminal — it works over SSH and inside
`tmux` with no passthrough configuration.

A few deliberate details:

- **`Esc` belongs to the editor.** It's the only key the terminal never
receives, because double-tapping it is how you get back to the `≡`
menu. Everything else — including `Ctrl+C`, `Ctrl+D`, `Ctrl+Z`, and
arrow-key history — goes to the shell.
- **The `Esc`-leader shortcuts stand down inside a terminal.** Elsewhere
`Esc s` saves and `Esc q` quits, but a shell prompt is the one place
you press `Esc` by reflex, and swallowing the next key to run an editor
action would be both surprising and destructive. Double-tap `Esc` for
the menu instead — every action is still there.
- **Terminal tabs never look "unsaved."** They have no file, so Save,
Find, and the git gutter skip them, and quitting won't prompt about
them.
- **Closing the tab closes the shell**, and quitting the editor closes
every terminal it opened. Backgrounded jobs are hung up with the shell
rather than orphaned.
- **The status bar** shows `terminal · shell running`, or the exit
status once the shell has exited.

Terminal tabs are unix-only (macOS and Linux). On Windows the menu row
is greyed out, since Windows has no PTY the editor can drive this way.

## Custom actions (open remote files on your laptop)

[![Watch the walkthrough](https://img.youtube.com/vi/vDWZWEmIiZ8/maxresdefault.jpg)](https://www.youtube.com/watch?v=vDWZWEmIiZ8)
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ go 1.24.0

require (
github.com/alecthomas/chroma/v2 v2.24.0
github.com/creack/pty v1.1.24
github.com/gdamore/tcell/v2 v2.13.9
github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
)

Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ github.com/alecthomas/chroma/v2 v2.24.0 h1:zrg+k0tAaVbM8whaT2hR5DOUqAdopsDaH998E
github.com/alecthomas/chroma/v2 v2.24.0/go.mod h1:l+ohZ9xRXIbGe7cIW+YZgOGbvuVLjMps/FYN/CwuabI=
github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs=
github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8=
Expand All @@ -14,6 +16,8 @@ github.com/gdamore/tcell/v2 v2.13.9 h1:uI5l3DYPcFvHINKlGft+en23evOKL+dwtD21QR8ej
github.com/gdamore/tcell/v2 v2.13.9/go.mod h1:+Wfe208WDdB7INEtCsNrAN6O2m+wsTPk1RAovjaILlo=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 h1:AgcIVYPa6XJnU3phs104wLj8l5GEththEw6+F79YsIY=
github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68=
github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQwVHXptag=
github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
Loading
Loading