Align Markdown Tables in Vim
You want a table in your GitHub document:
GitHub-Flavored Markdown supports formatting data as a table:
| Step | Users | Conversion | Obstacles | | --- | --- | --- | --- | | Viewed Home Page | 13,129 | 7.9% | Messaging | | Viewed Sign Up Page | 1,044 | 20.6% | Cost, credit card | | Signed Up | 215 | 31.2% | Credit card required | | Entered Credit Card | 67 | 50.7% | HTML, deployment | | Received Submission | 34 | | |
Over time, as you edit this data in Vim, keeping the Markdown table aligned could be painful, but doesn't have to be.
<Leader><Bslash> mapping in
" Align GitHub-Flavored Markdown tables vmap <Leader><Bslash> :EasyAlign*<Bar><Enter>
<Bslash> key is also the
a mnemonic when looking at the
|s of the table.
Here's how it looks: