Editing Cells
VisiData's cell editor lets you modify values directly in any sheet. Edits are held in memory — nothing reaches disk until you explicitly save with Ctrl+S.
Think of it like this: VisiData is always working on a live copy in RAM. Your original file is untouched until you consciously press Save.
Understand the edit lifecycle: enter edit mode (e), modify, accept or cancel, then optionally save (Ctrl+S). Nothing is written to disk unless you explicitly save. For bulk column editing commands, see Column Editing.
Your source file is unchanged until you press Ctrl+S and confirm overwrite or provide a new filename.
Sample Data Used in This Lesson
cat > ~/github/practice-folder/visidata/04-cleaning/01-dirty_orders.csv << 'EOF'
order_id,customer,status,amount,region
1001,Alice,active,250,sg
1002,Bob,pending,150,kl
1003,Carol,actve,400,sg
1004,Dave,error,0,
1005,Eve,pending,320,kl
EOF
vd ~/github/practice-folder/visidata/04-cleaning/01-dirty_orders.csv
Inside VisiData:
order_id customer status amount region
1001 Alice active 250 sg
1002 Bob pending 150 kl
1003 Carol actve 400 sg ← typo: "actve"
1004 Dave error 0 ← missing region
1005 Eve pending 320 kl
Fix a Typo in a Cell
Carol's status has a typo: actve instead of active.
# Move cursor to Carol's 'status' cell (row 3, status column)
e
# Edit field opens — shows current value: actve
# Use Backspace to delete, type: active
Enter
Result:
order_id customer status amount region
1001 Alice active 250 sg
1002 Bob pending 150 kl
1003 Carol active 400 sg ← fixed
1004 Dave error 0
1005 Eve pending 320 kl
Inside Edit Mode — Keyboard Shortcuts
| Key | Action |
|---|---|
Enter | Accept the edit |
Ctrl+C | Cancel and discard the edit |
Ctrl+A | Move cursor to beginning of field |
Ctrl+E | Move cursor to end of field |
Ctrl+K | Clear from cursor to end of line |
Ctrl+U | Clear from cursor to beginning of line |
Tab | Accept edit and move cursor right |
Shift+Tab | Accept edit and move cursor left |
Up / Down | Accept edit and use previous/next input history |
Bulk Set Column Value for Selected Rows (ge)
Instead of editing each cell one by one, use ge to set the same value for all selected rows in the current column.
# Select all 'pending' rows
|
# Enter: pending
# Bulk-set their status to 'PENDING' (uppercase)
ge
# Enter: PENDING
Before:
order_id customer status amount region
1002 Bob pending 150 kl
1005 Eve pending 320 kl
After ge → PENDING:
order_id customer status amount region
1002 Bob PENDING 150 kl
1005 Eve PENDING 320 kl
Fill Null Cells Downward (f)
If a column has blank/null cells, press f to fill each null with the non-null value from the row above.
Before (region column has a blank for Dave):
order_id customer status amount region
1001 Alice active 250 sg
1002 Bob pending 150 kl
1003 Carol active 400 sg
1004 Dave error 0 ← blank
1005 Eve pending 320 kl
# Move cursor to 'region' column
f
After — Dave's region is filled from Carol's row above:
order_id customer status amount region
1001 Alice active 250 sg
1002 Bob pending 150 kl
1003 Carol active 400 sg
1004 Dave error 0 sg ← filled from above
1005 Eve pending 320 kl
f fills from the nearest non-null value above. It's perfect for spreadsheets where a category label only appears in the first row of a group.
Undo and Redo
# After making a change:
U # undo the last change
R # redo (reapply the undone change)
To enable undo, add this to ~/.visidatarc:
options.undo = True
Open a Cell in an External Editor
For long text, descriptions, or JSON content that is hard to edit inline:
# Move cursor to a large text cell
^O
# Opens the cell content in your $EDITOR (vim, nano, etc.)
# Edit, save, and quit the editor → VisiData picks up the changes
Bulk Edit with External Editor (g^O)
g^O opens the current column value for all selected rows as one file in your $EDITOR — one value per line.
# Select all 'error' rows
|
# Enter: error
# Open all selected rows' 'status' column in vim at once
g^O
# A temp file opens in vim with each selected cell value on its own line
# Edit all values, save and quit
# All selected rows are updated simultaneously
Renaming Columns
^ rename current column (opens input prompt)
g^ rename all unnamed columns to content of selected rows
z^ rename current column to content of current cell
# Move cursor to 'order_id' column
^
# Enter: id
# Column header changes from 'order_id' to 'id'
Saving Changes
Ctrl+S save current sheet to file (prompts for filename)
g Ctrl+S save all open sheets to files
z Ctrl+S save current column only
If you save back to the original file, VisiData will prompt for confirmation. Always use a new filename first if you are unsure about overwriting.
# Save changes to a new file
Ctrl+S
# Enter: /tmp/orders_cleaned.csv
# Original file is untouched
# Save to original (with confirmation)
Ctrl+S
# Enter: ~/github/practice-folder/visidata/04-cleaning/01-dirty_orders.csv
# VisiData prompts: "overwrite?" → yes
Complete Edit Commands Reference
| Key | Action |
|---|---|
e | Enter edit mode on current cell |
ge | Set current column for all selected rows |
^O | Open current cell in external $EDITOR |
g^O | Open current column for selected rows in $EDITOR |
f | Fill null cells with value from above |
^ | Rename current column |
U | Undo most recent modification |
R | Redo most recent undo |
Ctrl+S | Save current sheet |
Hands-On Practice
vd ~/github/practice-folder/visidata/04-cleaning/01-dirty_orders.csv
# 1. Move to Carol's 'status' cell (row with 'actve'), press e → fix to 'active'
# 2. Press U → undo the change (confirm it reverts)
# 3. Select rows where status = 'pending': | → Enter: pending
# 4. Bulk-set status: ge → Enter: PENDING
# 5. Press U → undo
# 6. Move to 'region' column where Dave has no region → press f (fill from above)
# 7. Press Ctrl+S → save as /tmp/orders_edited.csv