Druk’s editor pane sits at the center of the window, flanked by the file tree on the left and bounded by a tab strip at the top and a status bar at the bottom. Every file you open lands in the editor, each in its own tab, and you can keep as many tabs alive simultaneously as you like. The editor renders entirely in the terminal — no GUI, no Electron — yet still gives you the full experience of a modern code editor: syntax highlighting, vim mode, undo history, clipboard integration over SSH, and automatic save on blur.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/letstri/druk/llms.txt
Use this file to discover all available pages before exploring further.
Tabs
Opening a file from the tree creates a preview tab: the name is displayed in italics, and the next file you open from the tree takes its place. Previewing is how you browse quickly without cluttering the tab strip. A tab becomes pinned — shown in normal weight — the moment you start editing, double-click the tab, or save.| Key | Action |
|---|---|
Ctrl+T | Open the tab switcher (fuzzy pick from all open tabs) |
Ctrl+W | Close the current tab (prompts if unsaved) |
Ctrl+Opt+T | Reopen the last closed tab |
Ctrl+Opt+← | Switch to the previous tab |
Ctrl+Opt+→ | Switch to the next tab |
F1 → Tabs).
Syntax Highlighting
Druk uses tree-sitter for syntax highlighting, meaning every language has a full incremental parse tree rather than a regex approximation. Grammars for JavaScript, TypeScript, and Markdown are bundled directly inside the binary; additional grammars are vendored alongside it. The full list of supported languages includes:Web
JavaScript, TypeScript, TSX, JSX, TSRX, Vue, HTML, CSS, SCSS, SASS, LESS, JSON, PHP, Svelte
Systems
Rust, C, C++, Go, Swift, Zig
JVM & Mobile
Java, Kotlin, Scala, Dart
Scripting
Python, Ruby, Bash, Lua, Elixir
Config & Markup
TOML, YAML, Markdown, INI, Env (.env), SQL
Other
C#
Editing Shortcuts
All standard editing operations work from the keyboard.Ctrl+C copies when text is selected and exits Druk when nothing is — so you can never accidentally discard unsaved work by misfire.
| Key | Action |
|---|---|
Ctrl+S | Save the current file |
Ctrl+Z | Undo |
Ctrl+Y | Redo |
Ctrl+C | Copy selected text (or quit if nothing is selected) |
Ctrl+X | Cut selected text |
Ctrl+V | Paste |
Ctrl+/ or Ctrl+L | Toggle line or selection comment |
Opt+↑ / Opt+↓ | Move current line or selection up / down |
Opt+Shift+↑ / Opt+Shift+↓ | Duplicate current line or selection up / down |
Ctrl+G | Go to line number |
Ctrl+Space | Trigger autocomplete |
Copy, cut, and paste use OSC 52 — the terminal clipboard escape sequence — so they work with your system clipboard even over an SSH session, as long as your terminal supports OSC 52 (iTerm2, kitty, WezTerm, and most modern terminals do).
Ctrl+/ at all (macOS Terminal.app is a common example), which is why Toggle comment also responds to Ctrl+L. Both are also available in the command palette under Editor.
Vim Mode
Druk ships a built-in vim emulation layer. Enable it by settingvim: true in ~/.config/druk/config.json, or toggling it on the Settings page (F1 → Settings).
Enable vim mode
Open the command palette with
F1, choose Settings, navigate to the vim row, and press Enter to toggle it on. Changes apply immediately.Learn the basics
Druk starts in Normal mode. Press
i to enter Insert, Esc to return to Normal, and v / V to enter character / line Visual mode.Modes
| Mode | How to enter | Status bar label |
|---|---|---|
| Normal | Esc from any mode | NORMAL |
| Insert | i (before cursor), a (after), o (new line below), O (new line above), I (line start), A (line end) | INSERT |
| Visual | v (character), V (line) | VISUAL |
Motions
| Key | Motion |
|---|---|
h / l | Left / right |
j / k | Down / up |
w / b | Word forward / backward |
0 | Line start |
$ | Line end |
gg | Buffer start (or {n}gg for line n) |
G | Buffer end (or {n}G for line n) |
{ / } | Paragraph up / down |
Ctrl+D / Ctrl+U | Scroll 10 lines down / up |
Operators
| Operator | Effect |
|---|---|
d{motion} | Delete (e.g. dw, d$, dd) |
c{motion} | Change — delete and enter Insert mode |
y{motion} | Yank (copy) into the register |
D | Delete to end of line |
C | Delete to end of line and enter Insert mode |
x | Delete character under cursor |
p / P | Paste register after / before cursor |
u | Undo |
Ctrl+R | Redo (in vim mode; Ctrl+Opt+F for project search) |
3dd deletes 3 lines, 5j moves down 5 rows.
Text objects are supported for bracket pairs — di( deletes inside parentheses, da{ deletes the whole block including braces.
In Visual mode, d / x deletes the selection, y yanks it, and c replaces it and enters Insert.
Auto-Save
WhenautoSaveOnBlur is true (the default), Druk automatically saves any dirty buffer when you:
- Switch to a different tab
- Switch to a different terminal window (the TUI loses focus)
Ctrl+S manually — context-switching takes care of it. If you prefer to control saving entirely by hand, set autoSaveOnBlur: false in settings.