CodeDB includes a built-in CSV and TSV viewer that renders tabular data as an interactive table with virtual scrolling for large datasets.
When you open a .csv or .tsv file, CodeDB automatically shows it in Table view instead of the raw text editor. The viewer detects the delimiter based on file extension:
.csv files use comma (,) as delimiter.tsv files use tab as delimiterThree view modes are available via the toolbar at the top of the editor:
| Mode | Description |
|---|---|
| Table | Renders data as a formatted, scrollable table with headers |
| Raw | Shows the raw text in the Monaco code editor |
| Edit | Opens the text in Monaco for editing; switching back to Table re-parses the content |
You can set the default view mode in Settings (⌘,). Options:
CodeDB can color-code table columns for easier reading. Configure this in Settings:
| Setting | Effect |
|---|---|
| Off | No column coloring |
| Headers Only (default) | Column headers get distinct background colors |
| Full Columns | Both headers and data cells get subtle alternating color tints |
Eight distinct color hues cycle across columns for visual differentiation.
The CSV viewer uses virtual scrolling to handle large datasets efficiently. Files with 100,000+ rows render smoothly because only visible rows are added to the DOM.
Tip: The file content is the single source of truth. Edits in Raw or Edit mode are reflected when you switch back to Table view.