VIM Table Mode

UPDATE 2: Released v 2.0 of the plugin. Check github for details.

UPDATE : I have added more features to the original plugin, showcasing some core features in a new demo (Part 2).

Recently a friend of mine showed off emacs table mode to me and to be honest, I felt a bit jealous :). Hence I began to search for existing vim plugins that might offer a similar functionality and I did find a plugin VIM RST Tables, which is a ftplugin that aids the creation of tables within rst files and allows you to format existing content into a table, although this plugin came closest to what I was looking for it wasn’t quite there. Then I found a very interesting & simple plugin shared as a gist by the infamous Tim Pope: cucumbertables.vim which I found quite impressive.

I began experimenting with this in an attempt to make it a bit more comprehensive and to allow for better formatted tables creation and after hacking on it for a couple of nights I came up with the VIM Table Mode vim plugin.

You can see it in action here :

Part 2: #

Part 1: #

All you have to do is start on a new line (1)Indentation is ignored , Enable Table Mode by either calling the command :TableModeEnable, or :TableModeToggle or you can also use the default mapping <Leader>tm which can be changed easily or alternative you can also enable table mode permanently by setting let g:table_mode_always_active = 1 in your vimrc (2)Not recommended .

I believe I have successfully been able to create a truly awesome table mode plugin that enables one to create very neat looking tables that align automatically on the fly as you type and at the same time is highly customisable. Please go through the vim helpdocs with :h table-mode.txt for details on how to customize it.

Please do use it and report any bugs if you find and give your feedback.

comments powered by Disqus