Aligning tables

After switching from Vim to Kakoune, I was missing a table-mode plugin, that takes care of aligning markdown tables. Maybe it is useful for someone of you too. Feedback is very welcome, as I am still discovering Kakoune.
https://gitlab.com/listentolist/kakoune-table
It is similar to the built-in table editor of Emacs org-mode. At the moment it depends on GNU awk and some Unix tools.

7 Likes

Nice!

This has been on my to-do list for months. I’ll check it out soon.

woohoo! I love this feature in Org Mode, now it is possible in Kakoune as well! Nice work!

I don’t know if I’ll need this in the immediate future, but I was wrestling with GFM tables just the other day, so I expect it’ll come up again eventually. Thanks!

Some suggestions for future improvements:

  1. Look at https://github.com/alexherbo2/replace-mode.kak. May be interesting feature to enable some flavor of replace mode while editing table. If next character is table delimiter | then it should instead switch to basic inserting or align whole table.
  2. Support different row separators, like in org mode |----+----|, instead of using -|- we use +, which your plugin currently replaces.
  3. Row and column movement would be nice thing. Involves boundary detection.

Thanks for the nice replies!
@andreyorst

  1. That would be a nice feature and probably fun to implement it. I actually already thought about that when I used Emacs org-mode.
  2. Yes, that is actually just one command to add. I just have to look, where to put it, and whether or not it might be a good opportunity to add support for other table formats as well.
  3. I already implemented it, but I have to check it for bugs, before I push it to Github
1 Like