I like Markdown because the source remains readable without a special editor. Tables are the exception.
A small table is easy to fix by hand. A wide table with long cells, escaped pipes, alignment markers, or mixed Unicode text is not. After changing one value, I would often spend more time repairing spaces and separators than editing the data itself. Tables pasted from CSV, TSV, reports, and generated output made the problem especially visible.
That is why I built Markdown Table Editor for Notepad++, a native C++ plugin that edits pipe tables directly in the document.
The workflow I wanted
The basic operation is deliberately simple: put the caret anywhere inside a Markdown table and run a command from Plugins > Markdown Table Editor.
The plugin can:
- align a table once or keep it aligned after edits;
- move between cells and insert, delete, or reorder rows and columns;
- sort body rows by the current column;
- convert the selected CSV/TSV text, or the CSV/TSV block around the caret, into a Markdown table;
- fit a wide table to the visible editor width.
The last command is the part that changed how I work with large tables. Notepad++ word wrap only changes how a long source line is displayed. It does not change the Markdown table, so columns can become visually fragmented. The plugin instead rewrites long cell contents into continuation rows while keeping the table's right edge within the available width where possible.
When the editor becomes wider again, it can join those continuation rows back together. This makes fitting a table a reversible document transformation rather than a one-way formatting trick.
Fitting a table without destroying it
The width algorithm has to balance several constraints:
- Parse the table around the caret and preserve its alignment markers (
---,:---,---:, or:---:). - Rejoin rows that look like continuation rows produced by an earlier fit, without merging ordinary sparse rows that merely look similar.
- Measure the natural width of every column and calculate a width budget from the visible Notepad++ editor area.
- Shrink columns with wrappable content toward safe minimums, then distribute any remaining space.
- Wrap cell contents at word boundaries and split a long token only when it cannot fit any other way.
This is also why display width cannot be treated as std::string::size(). The core works with UTF-8 and accounts for wide CJK characters, combining marks, variation selectors, and joined emoji sequences when calculating screen columns. Byte length, Unicode code-point count, and terminal/editor display width are different quantities.
Another small but important case is the escaped pipe. In this row:
| Format | Example |
| --- | --- |
| Markdown | use `\|` inside a cell |
the escaped \| belongs to the cell; it is not a column separator. Parsing and rendering must agree about that or one formatting pass can silently change the table structure.
CSV and TSV are not just split(',')
The conversion command first finds a local delimited block instead of consuming unrelated text above or below the caret. It also ignores delimiters inside quoted CSV fields and handles escaped quotes. Once the rows are parsed, they go through the same Markdown rendering path as tables edited in place.
Keeping the table transformations in a separate C++ core made these cases testable without driving the Notepad++ UI. The test suite covers parsing, alignment, sorting, CSV/TSV conversion, range detection, escaped pipes, Unicode width, repeated fit/expand cycles, and large generated tables. Performance benchmarks are part of CI as well.
Trying it
The plugin is available in the official Notepad++ Plugins Admin:
- Open
Plugins > Plugins Admin. - Search for
Markdown Table Editor. - Install it and restart Notepad++ when prompted.
Version 11.2.0 is available for x86, x64, and ARM64. Release archives, checksums, an SBOM, and build attestations are also available in the GitHub repository.
If you work with Markdown tables in Notepad++, I would be interested to hear which table shapes or edge cases are still awkward in real documents.

Top comments (0)