Text editor · free and open source
dan
A quick, modeless text editor for the terminal, with plenty of gusto.
brew install dfallman/tap/dan View on GitHub macOS, Linux, and Windows
About
Dan is a modeless editor for the terminal. There is no dotfile to write before you start and no modes to learn: open a file, and CtrlS, CtrlZ, CtrlF, and the mouse do what they do everywhere else. Everything else is a CtrlP away, in a command palette that fuzzy-searches every action, open buffer, and project file.
It is written in Rust, keeps input latency low over SSH, and its rope buffer stays responsive on files far past the point where most editors stall. Try it on a 100 MB log.
Saves are atomic, a swap file is kept every five seconds, and when a coding agent or git checkout changes a file you have open, Dan merges that with your unsaved edits, and only asks when you both changed the same lines.
What it does
Modeless
No insert and normal modes. CtrlS saves, CtrlQ quits, and Shift with the arrows selects.
Command palette
CtrlP fuzzy-searches every action, open buffer, and project file.
Large files
A rope buffer means file size doesn’t dictate speed. Edits stay quick deep into a 100 MB log.
Agent-friendly
When an agent, a formatter, or
git checkoutrewrites an open file, Dan merges it with your unsaved edits and marks what changed.Hard to lose work
Atomic saves, and a swap file every five seconds. A crash or a dropped SSH session is offered back on the next open.
Find and replace
Incremental search as you type,
/regex/when you need it, and$1capture groups in the replacement.Formats on request
CtrlL runs rustfmt, ruff, or prettier, and applies the result only if you didn’t type meanwhile.
Any text, any terminal
Syntax highlighting that follows your terminal’s theme, soft wrap, Unicode and CJK, and legacy encodings written back as they were.
Who it’s for
You like Nano
Then you’ll feel at home in Dan within a minute. It’s just as quick for an edit over SSH, in a tmux pane, or beside a coding agent, and you get a command palette, full mouse support, and crash recovery on top.
You never learned Vim
I’m with you. CtrlS, CtrlZ, CtrlV, and CtrlQ do what they do everywhere else, and the mouse just works. There are no modes and nothing to learn first. When you can’t remember a shortcut, CtrlP finds it for you.
Your editor chokes on big files
You need to look through a 100 MB log or CSV, and your usual editor freezes. Dan opens it, scrolls it, and searches it with a regex without breaking a sweat.
Install
With Homebrew, on macOS or Linux:
brew install dfallman/tap/dan Prebuilt binaries for macOS, Linux, and Windows are on the latest release page, and the source is on GitHub.
Try it
dan notes.md Press CtrlP for the command palette. The shortcut bar along the bottom is already there, and CtrlH hides it.
Dan is free and open source under the GPL-3.0 licence. Read the source, report an issue, or contribute on GitHub.