# Aligning tables

**URL:** <https://discuss.kakoune.com/t/aligning-tables/860>\
**Category:** Plugins\
**Created:** [January 23, 2020, 6:02pm UTC](https://discuss.kakoune.com/t/aligning-tables/860 "2020-01-23T18:02:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![listentolist](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/listentolist/32/416_2.png) [@listentolist](https://discuss.kakoune.com/u/listentolist)\
**Post date:** [January 23, 2020, 6:02pm UTC](https://discuss.kakoune.com/t/aligning-tables/860/1 "2020-01-23T18:02:19Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![eraserhd](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/eraserhd/32/15_2.png) [@eraserhd](https://discuss.kakoune.com/u/eraserhd)\
**Post date:** [January 23, 2020, 6:55pm UTC](https://discuss.kakoune.com/t/aligning-tables/860/2 "2020-01-23T18:55:04Z")

</div>

Nice!

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

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [January 24, 2020, 8:14am UTC](https://discuss.kakoune.com/t/aligning-tables/860/3 "2020-01-24T08:14:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Screwtapello](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/screwtapello/32/12_2.png) [@Screwtapello](https://discuss.kakoune.com/u/Screwtapello)\
**Post date:** [January 24, 2020, 8:36am UTC](https://discuss.kakoune.com/t/aligning-tables/860/4 "2020-01-24T08:36:04Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [January 24, 2020, 12:50pm UTC](https://discuss.kakoune.com/t/aligning-tables/860/5 "2020-01-24T12:50:45Z")

</div>

Some suggestions for future improvements:

1. Look at [https://github.com/alexherbo2/replace-mode.kak](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.

---

<div class="post-metadata">

**Author:** ![listentolist](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/listentolist/32/416_2.png) [@listentolist](https://discuss.kakoune.com/u/listentolist)\
**Post date:** [January 24, 2020, 10:22pm UTC](https://discuss.kakoune.com/t/aligning-tables/860/6 "2020-01-24T22:22:39Z")

</div>

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
