Skip to content

feat(csv): structural editing primitives (insert/delete column & row, split/merge, header toggle, CSV properties) #1469

@salmonumbrella

Description

@salmonumbrella

Problem

TablePro now opens (#1259), navigates and copies (#1330), selects column/cell ranges (#1446), and is gaining client-side filtering (#1454) on CSV files. What's still missing is the ability to mutate the file structure — delete an empty column, insert one to the right, drop a stray row, flip a row from header to data, or fix an auto-detected delimiter that came out wrong. Today these tasks force a bounce to Tablecruncher or Modern CSV, exactly the second-app split #1259 set out to collapse.

The column-header right-click menu already has Copy Column Values, Copy as CSV/Markdown/IN Clause, Fill column… (#1398), and Hide Column. It's the natural home for the missing structural verbs.

Proposed solution

1. Column-header right-click — add structural items

  • Insert Column to the Left
  • Insert Column to the Right
  • Delete Column
  • divider
  • Split Column… — by delimiter or regex, into N new columns
  • Merge with Next Column… — joiner string

If multiple columns are selected via #1446, the verbs operate on the selection.

2. Row-gutter right-click

  • Insert Row Above
  • Insert Row Below
  • Delete Row(s) — operates on the multi-row selection

3. Edit menu mirror

All of the above also appear under Edit so they're keyboard-discoverable and shortcut-bindable, mirroring Tablecruncher's csvmenu.cpp.

4. CSV-mode settings

  • Switch First Row Between Header / Data — toggle, ⌘⇧H. Without this, "Delete Column" semantics ambiguate when the header row was wrongly auto-detected.
  • Set CSV Properties… dialog — delimiter, quote char, escape char, encoding, line ending. Auto-detected at open, manually overridable + Reload.

5. UX rules

  • Pure in-memory mutations; file marked dirty until Save.
  • One undo entry per invocation.
  • Delete Column / Delete Row(s) show a confirm only if the target contains any non-empty cell.
  • Save writes through with the currently-configured CSV properties — no silent re-encoding.

Implementation notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions