Navigate and edit

Editor

Navigate and edit

Move through a project with Red's file tools and use its Vim-style editing model without guessing which commands are available.

Open files and projects

red src/main.rs
red src/main.rs src/lib.rs
red -r path/to/project src/main.rs

The -r option sets the workspace root explicitly. Inside Red, press Ctrl-p for the file picker, Ctrl-j or Space b for open buffers, and Ctrl-e for the file tree.

Add a line number to a file-picker query to open that location. For example, render:240 opens the selected matching file at line 240.

Move in Normal mode

h j k lMove left, down, up, and right
w b eMove by word
0 ^ $Move to line boundaries
gg / GMove to the first or last line
Ctrl-u / Ctrl-dMove half a page
Ctrl-o / Ctrl-iMove backward or forward through jumps

Use gj and gk to move by displayed rows when long lines wrap.

Edit with motions

Operators combine with motions and text objects. dw deletes a word, ci( changes inside parentheses, and y$ copies to the end of the line. Counts work with supported actions: 3dw deletes three words.

KeysResult
i, a, oEnter Insert mode at common positions
x, dd, DDelete a character, line, or to line end
u, Ctrl-rUndo and redo
p, PPaste after or before the cursor
.Repeat the last completed change
:w, :waSave the current file or all modified files

Use syntax-aware movement

When the current language supplies structural queries, ]f and [f move between functions, ]c and [c move between classes, and ]m and [m move between calls. Use af, if, ac, ic, am, or im as Visual selections or operator targets.

Edit repeated text with multiple cursors

Press Ctrl-n on a word to select it, then press it again to add the next occurrence. Use q to skip one match, Q to remove the active selection, and n or N to move through matches. Press c, type the replacement, and press Esc; one u undoes the complete multi-cursor edit.

Ctrl-Up and Ctrl-Down add vertical cursors while preserving display columns across tabs and spaces.