Mdtt
🗓️ Markdown Table Editor TUI
Install / Use
/learn @szktkfm/MdttREADME
🗓️ mdtt: Markdown Table Editor TUI
<img src="assets/01.gif" width="700">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.
📦 Installation
To install mdtt using Go, run:
go install github.com/szktkfm/mdtt/cmd/mdtt@latest
Or, download it:
🎬 Usage
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:
- Navigation: Use
hjklfor left, down, up, and right movements. - Editing: Press
ito switch to insert mode and edit cell content, exit insert mode withescorctrl+c. - Row and Column Manipulation:
- Add a new row or colymn with
o,vo. - Delete the current row or column with
dd,vd. - Copy the current row or column with
yy,vy. - Paste a copied row or column with
p. - Clear the current cell with
x. - Copy the current cell with
y..
- Add a new row or colymn with
For direct editing and saving changes to the same file, use:
mdtt -i filename.md
<img src="assets/03.gif" width=500>
You can use piping with mdtt as shown below:
pbpaste | mdtt | pbcopy
<img src="assets/04.gif" width=500>
To create a new table without an existing file, run mdtt without any arguments:
mdtt
<img src="assets/05.gif" width=300>
When multiple tables are present, you will be prompted to select the table you wish to edit.
<img src="assets/06.gif" width=500>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 Bindings
| 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 |
📝 Features
- [x] Vim-like Keybindings: Navigate and edit tables using familiar vim commands.
- [x] Inplace Editing: Directly modify your original markdown files with the -i option.
- [x] Piping Support
- [x] Multi-Table Selection
- [x] External Editor Integration: Delegate cell editing to an external editor specified by your $EDITOR environment variable.
- [ ] HTML in Cells: Enable rich content formatting by using HTML directly within table cells.
🙏 Acknowledgments
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.
License
Related Skills
node-connect
354.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
354.3kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
112.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
