vim-pandoc / vim-pandoc-syntax

pandoc markdown syntax, to be installed alongside vim-pandoc
MIT License
424 stars 61 forks source link

Can't get tables to render properly #271

Closed sbromberger closed 5 years ago

sbromberger commented 5 years ago

I've tried replicating the pipe table example in my installation of vim-pandoc (with vim-pandoc-syntax) and I can't get the tables to render. An example:

# pipe tables

| foo | bar | baz |
| ----- | ----- | ----- |
| 1 | 2 | 3 |

Yields simply img_0034

Italics, bold, and headings work properly. What am I doing wrong with tables?

Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'itchyny/lightline.vim'
Plug 'airblade/vim-gitgutter'
Plug 'joshdick/onedark.vim'
Plug 'w0rp/ale'
Plug 'AndrewRadev/splitjoin.vim'
Plug 'SirVer/ultisnips'
Plug 'maximbaz/lightline-ale'
Plug 'maralla/completor.vim'
Plug 'tomtom/tcomment_vim'
Plug 'JuliaEditorSupport/julia-vim'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'vim-pandoc/vim-pandoc'
Plug 'vim-pandoc/vim-pandoc-syntax'

on vim 8.1.950

Thanks for any advice.

alerque commented 5 years ago
  1. Do you even have the syntax plugin installed? I see it listed in your plugin list but did you actually install it (:PlugInstall if that is vim-plug).

  2. Is your filetype set to pandoc?

Your example works fine for me in testing. I would only note that in order to style headers you need no spaces in the separator line, like this:

# pipe tables

| foo | bar | baz |
|-----|-----|-----|
| 1 | 2 | 3 |
sbromberger commented 5 years ago

@alerque -

Do you even have the syntax plugin installed?

Yes.

Is your filetype set to pandoc?

Yes (see status line in lower right).

sbromberger commented 5 years ago

Closing this out since I've switched to a different package. Thanks.

fmoralesc commented 5 years ago

@sbromberger It would be nice to know if the problem really was caused by vim-pandoc-syntax, so I think closing the issue is premature. But of course, it's okay if you don't want to bother with it anymore. Or was the problem that the syntax file was not properly loaded?

On Mon, May 6, 2019, 4:27 PM Seth Bromberger notifications@github.com wrote:

Closed #271 https://github.com/vim-pandoc/vim-pandoc-syntax/issues/271.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vim-pandoc/vim-pandoc-syntax/issues/271#event-2321148167, or mute the thread https://github.com/notifications/unsubscribe-auth/AABWCGPBD7HQLFLDJFEFQMTPUA54TANCNFSM4HK26WXA .

alerque commented 5 years ago

Also hearing what syntax package you switched to that handles tables better would be nice to know! We might learn a thing on two.

sbromberger commented 5 years ago

It would be nice to know if the problem really was caused by vim-pandoc-syntax, so I think closing the issue is premature.

Sorry about that - feel free to reopen, but the project that required markdown project finished last month (I opened this issue about 3 months ago) and I don't really have the time to troubleshoot any further.

As far as replacement packages go, I never did find one that handled tables automatically. I wound up using plasticboy/vim-markdown for my project - it wasn't as full-featured, perhaps, but it didn't require any external plugins beyond tabular, which also gave me table formatting using :TableFormat.