Editor
Buffers and windows
Arrange files in splits, move between editor and plugin panes, and resolve files that changed outside Red.
Move between buffers
Ctrl-jOpen the buffer picker
Space SpaceSwitch to the previous buffer
Space n / Space pMove through the buffer list
:bn / :bpSelect the next or previous buffer
:bdDelete the current buffer
:lsList open buffers
Arrange windows and panes
| Keys | Action |
|---|---|
| Ctrl-w s | Split horizontally |
| Ctrl-w v | Split vertically |
| Ctrl-w h/j/k/l | Move between editor windows and docked panes |
| Ctrl-w H/J/K/L | Move the focused window or pane to an outer edge |
| Ctrl-w >/< | Resize horizontally |
| Ctrl-w +/- | Resize vertically |
| Ctrl-w = | Balance splits or restore a pane's original size |
| Ctrl-w z | Zoom the focused editor window or pane |
| Ctrl-w c | Close the focused window |
You can also drag editor and pane dividers with the mouse. Press Esc during a drag to cancel it.
Handle a file changed on disk
Red reloads a clean buffer when another program changes its file. If the buffer has unsaved edits, Red keeps your text and marks the conflict instead of overwriting either version.
:diffdiskCompare the buffer with the current disk version
:e!Discard local edits and reload from disk
:w fileSave the buffer under another name
:w!Deliberately overwrite the changed disk file
Ordinary :w and :wa don't silently overwrite an external change.