Skip to main content
Fresh brings IDE-level editing features to the terminal with zero configuration. This guide covers all the editing capabilities available out of the box.
Some keybindings may not work or may differ on your system due to differences in keyboard layouts, terminal emulators, and operating systems. If a keybinding doesn’t work, check the command palette (Ctrl+P) for alternative bindings, or see the Keyboard Configuration guide to customize them.

Smart Editing

Fresh includes intelligent editing behaviors that adapt to your code:

Smart Home

The Home key toggles between the first non-whitespace character and column 0, making navigation more efficient.

Smart Backspace

Backspace in leading whitespace removes one indent level instead of a single character.

Auto-indent

Enter preserves the current indentation level. After {, (, or :, an extra indent level is automatically added.

Bracket Matching

Matching brackets are highlighted automatically. Use “Go to Matching Bracket” from the command palette to jump between them.
Bracket matching is enabled by default. You can toggle it via the highlight_matching_brackets setting in your config.

Undo and Redo

Fresh provides robust undo/redo functionality that intelligently handles multi-cursor edits:
ShortcutAction
Ctrl+ZUndo last change
Ctrl+YRedo last undone change
Atomic Multi-cursor Operations: All edits made with multiple cursors are treated as a single atomic operation. One undo restores all cursor positions and their changes simultaneously.

Smart Undo Behavior

Fresh’s undo system skips over readonly actions (like cursor movements) and only undos write actions:
1

Type characters

Type abc in the editor
2

Move cursor

Move the cursor with arrow keys (readonly action)
3

Undo

Press Ctrl+Z — this undos both the cursor movement AND the last typed character
This means you never need multiple undo operations to get back to your actual edits.

Multi-Cursor Editing

Edit multiple locations simultaneously with Fresh’s powerful multi-cursor support. This is one of Fresh’s most powerful features, working exactly like VS Code or Sublime Text.

Creating Multiple Cursors

ShortcutAction
Ctrl+DAdd cursor at next occurrence of selection
Ctrl+Alt+↑Add cursor above current position
Ctrl+Alt+↓Add cursor below current position
EscRemove all secondary cursors
When you press Ctrl+D with no selection, Fresh automatically selects the word under the cursor first, then adds a cursor at the next occurrence.

Multi-Cursor Workflow Example

1

Select a word

Position your cursor on a variable name like value
2

Add cursors at matches

Press Ctrl+D repeatedly to add cursors at each occurrence of value
3

Edit simultaneously

Type to replace all occurrences at once, or use arrow keys to move all cursors together
4

Clear cursors

Press Esc to return to a single cursor
All multi-cursor edits (typing, deleting, pasting) are atomic — they can be undone with a single Ctrl+Z.

Block Selection

Block selection (also called column selection or rectangular selection) lets you select and edit a rectangular region of text across multiple lines.

Block Selection Controls

ShortcutAction
Alt+Shift+↑Extend block selection upward
Alt+Shift+↓Extend block selection downward
Alt+Shift+←Extend block selection left
Alt+Shift+→Extend block selection right
EscClear block selection

How Block Selection Works

1

Start selection

Position your cursor where you want to start the block
2

Create rectangular region

Press Alt+Shift+↓ to extend down and Alt+Shift+→ to extend right, creating a rectangular selection
3

Edit or copy

Type to replace the block, or Ctrl+C to copy only the rectangular region
Converting to Multi-Cursor: When you type or perform an editing action with a block selection, Fresh automatically converts it to multiple cursors — one for each line in the block. This gives you the power of multi-cursor editing with the precision of rectangular selection.

Selection Commands

Fresh provides powerful selection commands for quickly selecting text:
ShortcutAction
Ctrl+WSelect word under cursor
Ctrl+LSelect current line
Ctrl+ASelect all text in buffer
Shift+ArrowExtend selection by character
Ctrl+Shift+←/→Select word left/right
Shift+Home/EndSelect to line start/end
Ctrl+Shift+Home/EndSelect to document start/end
Shift+PgUp/PgDnSelect page up/down

Basic Editing Operations

Clipboard Operations

ShortcutAction
Ctrl+CCopy selection
Ctrl+XCut selection
Ctrl+VPaste from clipboard
With block selections, Ctrl+C copies only the rectangular region, not the entire lines.

Deletion

ShortcutAction
BackspaceDelete character backward
DelDelete character forward
Ctrl+BackspaceDelete word backward
Ctrl+DelDelete word forward
Ctrl+KDelete from cursor to end of line
Ctrl+K works like Emacs/Bash — it deletes from the cursor position to the end of the line.

Indentation

ShortcutAction
TabIndent selection or insert tab
Shift+TabDedent selection

Code Comments

ShortcutAction
Ctrl+/Toggle line comment (works with multi-cursor)
The comment syntax is automatically detected from the file type. Works with C-style //, Python #, and more.

Other Editing

ShortcutAction
Ctrl+TTranspose characters (swap character before and after cursor)

Text Transformation

Transform selected text with these commands (available from the command palette):

Case Conversion

  • Alt+U — Convert selection to UPPERCASE
  • Alt+L — Convert selection to lowercase

Line Operations

  • Sort Lines — Sort selected lines alphabetically
  • Trim Trailing Whitespace — Remove trailing spaces from all lines

Automatic Cleanup on Save

You can configure Fresh to automatically clean up files when saving:
config.json
{
  "trim_trailing_whitespace_on_save": true,
  "ensure_final_newline_on_save": true
}

Code Folding

Collapse and expand code blocks to focus on what matters:
1

Enable LSP

Code folding requires an LSP server that supports foldingRange. See LSP Configuration.
2

Click gutter indicator

Click the fold indicator in the gutter to collapse a code block
3

Expand

Click again to expand, or use “Toggle Fold” from the command palette
  • Navigation (up/down arrows) automatically skips over folded regions
  • Each split view maintains its own independent fold state

Vertical Rulers

Add visual column guides to enforce line length limits:
1

Add ruler

Open the command palette (Ctrl+P) and search for “Add Ruler”
2

Enter column

Enter the column number (e.g., 80 or 120)
3

Remove ruler

Use “Remove Ruler” from the command palette
Rulers are per-buffer. You can also set default rulers in your config:
config.json
{
  "rulers": [80, 120]
}

Auto-Save

Fresh supports two types of auto-save:
Enable automatic saving at regular intervals:
config.json
{
  "auto_save_enabled": true,
  "auto_save_interval": 30  // seconds
}
Default interval is 30 seconds.

Keyboard Macros

Record and replay sequences of keystrokes to automate repetitive tasks:
ShortcutAction
F5Stop macro recording
F4Play last recorded macro

Using Macros

1

Start recording

Open command palette (Ctrl+P) and search for “Record Macro”. Enter a register name (0-9).
2

Perform actions

Execute the keystrokes you want to record (typing, navigation, editing, etc.)
3

Stop recording

Press F5 or use “Stop Recording” from the command palette
4

Play back

Press F4 to replay the last macro, or use “Play Macro” to choose a specific register

Custom Macro Keybindings

Bind specific keys to play macros automatically:
config.json
{
  "keybindings": [
    {
      "key": "!",
      "modifiers": ["alt"],
      "action": "play_macro",
      "args": {"char": "1"},
      "when": "normal"
    },
    {
      "key": "@",
      "modifiers": ["alt"],
      "action": "play_macro",
      "args": {"char": "2"},
      "when": "normal"
    }
  ]
}
This binds Alt+Shift+1 to play macro 1 and Alt+Shift+2 to play macro 2.

Shell Integration

Run shell commands on your buffer or selection:
ShortcutAction
Alt+|Run shell command on buffer/selection (output shown)
Alt+Shift+|Run shell command and replace selection with output

Examples

# Select lines, then Alt+Shift+|
sort

Markdown Editing

Smart editing features for Markdown files (provided by the built-in markdown_source plugin):

List Continuation

Pressing Enter on a list item automatically continues the list with the same marker (bullets, numbers, checkboxes)

Smart List Removal

Pressing Enter on an empty list marker removes it

List Indentation

Tab indents list items and cycles through bullet styles (-, *, +)

Quote Handling

Single-quote auto-close is disabled so apostrophes don’t interfere with typing

Compose Mode (Experimental)

Enable distraction-free Markdown writing:
1

Enable compose

Open command palette and search for “Markdown: Toggle Compose”
2

Enjoy clean view

Markup like **, *, []() is concealed, soft line breaks are applied, and tables are rendered
3

Adjust width

Use “Markdown: Set Compose Width” to change the text width
4

Side-by-side view

Open the same file in a vertical split to see source and composed views simultaneously

Multi-Cursor Guide

Detailed multi-cursor editing workflows

Search & Replace

Find and replace text in files

Navigation

Moving around your codebase

Build docs developers (and LLMs) love