Editing markdown tables can be a drag. mdtt makes it easier with a slick TUI for terminal use and vim-style keybindings. It supports output to stdout and in-place file editing.
To install mdtt using Go, run:
go install github.com/szktkfm/mdtt/cmd/mdtt@latest
Or, download it:
To start editing your markdown table, simply run:
mdtt filename.md
Upon launching, mdtt will display the tables from your markdown file in a TUI.
While editing, you can utilize the following vim-like keybindings to navigate and modify your tables efficiently:
hjkl for left, down, up, and right movements.i to switch to insert mode and edit cell content, exit insert mode with esc or ctrl+c.o, vo.dd, vd.yy, vy.p.x.y..
For direct editing and saving changes to the same file, use:
mdtt -i filename.md
You can use piping with mdtt as shown below:
pbpaste | mdtt | pbcopy
To create a new table without an existing file, run mdtt without any arguments:
mdtt
When multiple tables are present, you will be prompted to select the table you wish to edit.
Press I to open the cell in the text editor set as your $EDITOR, allowing you to edit the cell directly within your chosen editor.
| Key | Action |
|---|---|
β/k | Move up |
β/j | Move down |
β/h | Move left |
β/l | Move right |
b/pgup | Page up |
f/pgdn | Page down |
ctrl+u | Half page up |
ctrl+d | Half page down |
g/home | Go to start |
G/end | Go to end |
i | Insert mode |
I | Open $EDITOR |
esc/ctrl+c | Normal mode |
o/vo | Add row/column |
dd/vd | Delete row/column |
x | Clear cell |
yy/vy | Copy row/column |
y. | Copy cell |
p | Paste |
q | Quit |
? | Toggle help |
This project, mdtt, was inspired by mdvtbl, a tool that reads markdown from stdin, allows for table editing in a web view, and outputs to stdout.
27 commits
Go
96.1%
Shell
3.5%
Editing markdown tables can be a drag. mdtt makes it easier with a slick TUI for terminal use and vim-style keybindings. It supports output to stdout and in-place file editing.
To install mdtt using Go, run:
go install github.com/szktkfm/mdtt/cmd/mdtt@latest
Or, download it:
To start editing your markdown table, simply run:
mdtt filename.md
Upon launching, mdtt will display the tables from your markdown file in a TUI.
While editing, you can utilize the following vim-like keybindings to navigate and modify your tables efficiently:
hjkl for left, down, up, and right movements.i to switch to insert mode and edit cell content, exit insert mode with esc or ctrl+c.o, vo.dd, vd.yy, vy.p.x.y..
For direct editing and saving changes to the same file, use:
mdtt -i filename.md
You can use piping with mdtt as shown below:
pbpaste | mdtt | pbcopy
To create a new table without an existing file, run mdtt without any arguments:
mdtt
When multiple tables are present, you will be prompted to select the table you wish to edit.
Press I to open the cell in the text editor set as your $EDITOR, allowing you to edit the cell directly within your chosen editor.
| Key | Action |
|---|---|
β/k | Move up |
β/j | Move down |
β/h | Move left |
β/l | Move right |
b/pgup | Page up |
f/pgdn | Page down |
ctrl+u | Half page up |
ctrl+d | Half page down |
g/home | Go to start |
G/end | Go to end |
i | Insert mode |
I | Open $EDITOR |
esc/ctrl+c | Normal mode |
o/vo | Add row/column |
dd/vd | Delete row/column |
x | Clear cell |
yy/vy | Copy row/column |
y. | Copy cell |
p | Paste |
q | Quit |
? | Toggle help |
This project, mdtt, was inspired by mdvtbl, a tool that reads markdown from stdin, allows for table editing in a web view, and outputs to stdout.
27 commits
Go
96.1%
Shell
3.5%