Skip to content

Pandoc/Vimtex Integration #9

@kwrobert

Description

@kwrobert

This is more of an open discussion/feature request than any sort of bug or issue so I did not follow the issue template.

I was thinking it would be nice to support integration with Vimtex and Pandoc, and to support the Pandoc flavor of markdown.

Supporting Vimtex integration would give users access to all the convenient text objects, insert mode mappings, and other typesetting features of Vimtex when taking notes in their wiki. Pandoc's flavor of markdown supports inline Latex, making access to Vimtex's mappings extremely valuable. Conforming to Pandoc's flavor of markdown allows users to render their wiki files to a multitude of output formats.

I am perhaps the ideal example use case for this integration. As a physics graduate student, having access to inline math via Latex is indispensable. I use Pandoc to convert my weekly journal summaries to PDF and send them along to my advisor to keep him updated about my progress. I have enabled this integration using the following snippet in my vimrc

augroup wiki_setup
    autocmd!
    " Enable pandoc for all wiki files
    autocmd BufNewFile,BufFilePre,BufRead *.wiki set filetype=wiki.pandoc.tex
    " Now enable vimtex plugin to get vimtex keybindings and such
    autocmd BufNewFile,BufFilePre,BufRead *.wiki call vimtex#init()
augroup END

Perhaps this is a vimtex issue and not a wiki issue, but I can't get vimtex to initialize using multiple filetypes like I have above. I need to explicitly call vimtex#init().

From a development perspective, one could offload the syntax highlighting to the vim-pandoc-syntax plugin, and only add syntax extensions onto that. It provides nice highlighting for math, lists, etc. Currently there is some weirdness with how the syntax from wiki.vim and vim-pandoc interact.

Anyway, I opened this issue to get people's thoughts and see if anyone else would find this useful. Also fishing for some cool ideas :)

Feel free to close if this seems too vague or not particularly useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions