Neovim: Manipulate Markdown Tables with Awk

Gareth Stretton
9 min readApr 20, 2024

--

This article shares how to manipulate markdown tables inside of Neovim using the ‘Awk’ command. The operations include: create table, add column, delete columns, extract a column's values, swap columns, clear row, format table, and sort table. The columns can be specified by name or column number.

A previous article shared how to do with using bash scripts. But Awk is a more natural and better choice. So I re-wrote those scripts in Awk.

My goals were to:

  • avoid programming “into the editor” itself (for…

--

--

Gareth Stretton

Entrepreneur, software engineer, electronics enthusiast, creator, dad, husband, inventor. What brings me joy is creating and sharing. https://ko-fi.com/gahrae