VimPlugin: vim-table-mode: Difference between revisions

From wikinotes
Line 16: Line 16:
<syntaxhighlight lang="vim">
<syntaxhighlight lang="vim">
<leader>tm  " toggle enable/disable table-mode
<leader>tm  " toggle enable/disable table-mode
<leader>ts  " sort by column under cursor
</syntaxhighlight>
</syntaxhighlight>



Revision as of 21:55, 14 October 2023

Markdown/ReStructuredText spreadsheet-like tables supporting cell formulas and alignment.

Documentation

github https://github.com/dhruvasagar/vim-table-mode
:help table-mode https://github.com/dhruvasagar/vim-table-mode/blob/master/doc/table-mode.txt

Usage

<leader>tm  " toggle enable/disable table-mode
<leader>ts  " sort by column under cursor
| foo | bar | baz |  " <<- press enter, followed by '||'

" generates:
" ==========
| foo | bar | baz |
|-----+-----+-----+  " <<- tadaa

" following lines will auto-adjust their width
" ============================================
| foo     | bar | baz |
|---------+-----+-----+
| aaaaaaa | bbb | ccc |