Skip to main content

Core Keys Cheatsheet

All the essential VisiData keystrokes organized for fast lookup during daily use.

Launching VisiData

vd file.csv # open CSV
vd -f tsv file.txt # open as TSV
vd -f fixed --skip 1 file.txt # open as fixed-width
command | vd -f fixed # pipe command output
vd -b input.csv -o output.json # batch convert
vd --play session.vdj # replay CommandLog

Global Commands

^Q abort VisiData immediately
^C cancel current input / abort async threads
q quit current sheet
gq quit all sheets (exit VisiData)
Q quit current sheet, remove from CommandLog
^H open man page (full reference)
Alt+H open help menu
z^H view command sheet for current sheet type
Space open command palette (type longname)
^G show cursor position and sheet bounds
^V show VisiData version

Cursor Movement

h j k l ← ↓ ↑ → (also arrow keys)
gh gj gk gl go all the way to edge of sheet
gg go to first row
G go to last row
^F scroll page forward (down)
^B scroll page back (up)
zz scroll current row to center
zr N go to row number N (0-based)
zc N go to column number N (0-based)
c regex go to next column matching regex
r regex go to next row (key) matching regex

Sheet Stack

Shift+S open Sheets Sheet (all open sheets)
Ctrl+^ jump to previous sheet
Alt+1–9 jump to sheet by number
q pop current sheet
gq quit all sheets
Z split screen (view two sheets)
Tab switch focus between panes
gZ close split

Row Selection

s select current row
u unselect current row
t toggle selection
gs / gu / gt select / unselect / toggle ALL rows
| regex select matching rows in current column
g| regex select matching rows in ANY column
z| expr select rows matching Python expression
, select rows matching current cell value
" open filtered sheet (selected rows only)
{ } jump to prev/next selected row

Column Operations

^ rename current column
_ toggle column width (full ↔ default)
g_ toggle ALL column widths
- hide current column
gv unhide all columns
H L slide column left / right
gH gL slide column to far left / far right
! toggle key column (blue)
z! unset key column
~ # % $ @ z# set type: str/int/float/currency/date/len
= expr create derived column from Python expression
g= expr set column for selected rows to expression result
: regex split column into multiple by regex
; regex extract capture groups as new columns
+ aggregator add aggregator to current column

Sorting

[ sort ascending by current column
] sort descending by current column
g[ sort ascending by all key columns
g] sort descending by all key columns
z[ sort ascending, preserve existing sort

Analysis Sheets

Shift+F frequency table for current column
gF frequency table grouped by all key columns
zF one-line summary for current/selected rows
Shift+I Describe Sheet (statistics for all columns)
gI Describe Sheet for all sheets
Shift+W pivot table (key column × aggregated column)
Shift+C Columns Sheet (edit all column metadata)
Shift+D CommandLog for current sheet
gD global CommandLog
Shift+M Melt Sheet (unpivot)
/ regex search forward in current column
? regex search backward
n N next / previous match
g/ regex search forward in ALL columns
g? regex search backward in ALL columns
z/ expr search by Python expression (current column)

Visualization

. plot current numeric column vs key column(s)
g. plot ALL numeric columns vs key column(s)
# In canvas (graph) sheet:
+ - zoom in / out
_ zoom to fit all data
x set x-axis range
y set y-axis range
Enter open source rows at canvas cursor

Editing

e edit current cell
ge text set current column for selected rows
^O open cell in external $EDITOR
U R undo / redo
a append blank row
ga N append N blank rows
d delete current row
gd delete selected rows
y gy yank (copy) current / selected rows
p paste clipboard rows after cursor
Ctrl+S save current sheet to file
g Ctrl+S save all sheets

Data Import / Export

o file open file in VisiData
^S file save current sheet to file
g^S save all sheets
z^S file save current column only
Ctrl+D file save CommandLog to .vdj file

Custom In-Place Filters

Space ff col op val filter-friendly: column is/is not/contains/starts with/ends with
Space fk kw filter rows by keyword (OR across columns)
Space fx expr filter rows by Python expression
Space fclear restore all rows (preserves added rows)

These are custom commands defined in 35-filter.py and 36-filter-friendly.py under common-config. Unlike z| + " which opens a new sheet, these hide rows in-place. The _all_rows master list ensures new rows added during a filter survive fclear.

Auto-Fill on Add Row

When a is pressed, the following columns auto-populate:

no → sequential number (max + 1)
pid → s-{no} (e.g. s-19)
c_date → YYYY-MM-DD-HH-MM (creation datetime)

Also available: Space backfill-cdate (fill empty c_date), Space today (insert date into cell).

Miscellaneous

Ctrl+E view last error traceback
Ctrl+T open Threads Sheet
Ctrl+L redraw screen
Ctrl+R reload current sheet from source
m key record macro (start/stop)
gm open Macro Index

Next