Neovim: Manipulating Markdown Tables

Gareth Stretton
7 min readJan 24, 2024

In this article I show how to manipulate markdown tables in Neovim. Each feature (e.g. Create Table, or Add Column) is demonstrated with a short animated GIF followed by the bash script that performs the work. This functionality could be applied by any editor that can pipe data through system commands.

Updates:

  • See the next article that shows how to manipulate tables using their column names (as well as column numbers)

Why Neovim?

You can blame ThePrimeagen. I’ve been watching his insightful and funny YouTube channel. I went down the rabbit hole and discovered that this retro-feeling editor is supremely powerful. I’ve dabble with its predecessor ‘Vim’ for over a decade but had not taken it very seriously. Neovim is great with plain-text and for me it is surprisingly fantastic with editing code (debugging, syntax highlighting, refactoring, etc.). But there is a severe learning curve! However, with the right resources and some practice you can master it.

My path was:

Setup

  1. Save the scripts to a folder on your computer
  2. Make sure they are executable (chmod u+x scriptname)
  3. Add that path to your system path (updated ~/.bashrc with…

--

--

Gareth Stretton

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