X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/edffbe1c16e39301b91972037ecc6f0b1359d311..1c86478c4a0f641382b1faac1f4d3d25e9fde153:/ftplugin/markdown.vim diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index d68e7c0..14c24bc 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -456,11 +456,16 @@ function! s:TableFormat() " Search instead of `normal! j` because of the table at beginning of file edge case. call search('|') normal! j - " Remove everything that is not a pipe othewise well formated tables would grow - " because of addition of 2 spaces on the separator line by Tabularize /|. + " Remove everything that is not a pipe, colon or hyphen next to a colon othewise + " well formated tables would grow because of addition of 2 spaces on the separator + " line by Tabularize /|. let l:flags = (&gdefault ? '' : 'g') - execute 's/[^|]//' . l:flags + execute 's/\(:\@