Skip to content

Repository files navigation

coder logo

coder

A lightweight terminal IDE that feels like VSCode.

Mouse clicks, git, autocomplete, LSP, themes and an embedded terminal — all inside your terminal.

Written in Rust with ratatui.

coder screenshot

Why

Terminal editors usually ask you to learn a new way of working. coder does not. Click a file, click a tab, drag to select text, press Ctrl+S to save. Everything works how you expect. It starts instantly and uses very little memory.

Features

  • Mouse everywhere — click tabs, files, buttons and checkboxes. Drag to select text, drag borders to resize panels, drag the scrollbar.
  • File explorer — lazy tree, create new files and folders inline.
  • Syntax highlighting — powered by syntect, works for most languages out of the box.
  • LSP support — autocomplete, diagnostics with inline squiggles, and formatting. Just point the config at a language server.
  • Git panel — branch, staged/unstaged tree, stage, unstage, revert, commit, fetch, pull, push and commit history.
  • Git diff view — open any changed file as a diff tab. Added lines green, removed lines shown inline in red.
  • Change gutter — every file shows its git changes next to the line numbers and on the scrollbar.
  • Find & replace — in the current file (Ctrl+F / Ctrl+H) or across the whole project, with regex support.
  • Embedded terminal — a real shell in a split panel (Ctrl+J).
  • Themes — Dracula, Gruvbox, Nord, One Dark, Monokai, Tokyo Night, Catppuccin and more. Switch live, your choice is saved.
  • Auto reload — files changed outside the editor reload automatically, unless you have unsaved edits.

Install

Build from source (needs Rust):

git clone https://github.com/eminfedar/coder
cd coder
cargo install --path .

Icons use a Nerd Font. If your terminal font has none, run with CODER_ASCII=1.

Usage

coder # open the current directory
coder src/ # open a directory
coder main.rs # open a single file

Shell completion:

coder completions bash > /etc/bash_completion.d/coder
coder completions zsh >~/.zfunc/_coder
coder completions fish >~/.config/fish/completions/coder.fish

Shortcuts

KeyAction
Ctrl+QQuit
Ctrl+SSave
Ctrl+WClose tab
Ctrl+BToggle sidebar
Ctrl+JToggle terminal
Ctrl+F / Ctrl+HFind / Find & replace
Ctrl+SpaceAutocomplete
Ctrl+Alt+FFormat file

Editing works the usual way: arrows, Home/End, PageUp/PageDown, Shift to select, Ctrl+←/ to jump words, Ctrl+C/X/V/Z/Y/A.

Configuration

Settings live in ~/.config/coder/config.toml. The file is created on first run and you can edit it by hand.

theme = "base16-ocean.dark"format_on_save = falsetrim_trailing_whitespace = trueinsert_final_newline = trueinline_diagnostics = true
[rust]
extensions = ["rs"]
lsp = "rust-analyzer"formatter = "rustfmt --edition 2021"linter = ""
[python]
extensions = ["py", "pyi"]
lsp = "ruff server"formatter = "ruff format -"linter = ""

Adding a language means adding a section. Install the language server yourself, then name its command in lsp. An empty string means the tool is not used.

Environment variables

VariableMeaning
CODER_ASCII=1Use ASCII icons instead of Nerd Font glyphs
CODER_CONFIGPath of the config file
CODER_THEMES_DIRExtra folder with .tmTheme files
CODER_SYNTAXES_DIRExtra folder with .sublime-syntax files

Development

cargo run [dir] # run
cargo test# tests
cargo clippy # lint

The code follows the Elm Architecture: Model holds all state, Msg describes what happened, update changes the state, Cmd runs side effects, and view draws. See AGENTS.md for the full map.

License

MIT

About

Easy-to-use, VSCode inspired terminal code editor with mouse support!

Resources

Stars

16 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages