Przeglądaj źródła

Add vim-pandoc for document creation from markdown

This allows a user to create `.pandoc` text files, and produce
same-named `.docx` files (default) on save or update. For writing
purposes, vim-pandoc + goyo/limelight is an excellent pairing!

Pandoc is capable of many other formats and can also integrate with
bibliography formats!

To learn the pandoc markdown syntax, refer to
http://pandoc.org/README.html#pandocs-markdown
Weiyi Lou 10 lat temu
rodzic
commit
4965cdd942
2 zmienionych plików z 15 dodań i 0 usunięć
  1. 2 0
      vim/plugins.vim
  2. 13 0
      vim/settings/pandoc.vim

+ 2 - 0
vim/plugins.vim

@@ -23,6 +23,8 @@ Plug 'terryma/vim-multiple-cursors'
 Plug 'tpope/vim-endwise'
 Plug 'tpope/vim-fugitive'
 Plug 'tpope/vim-repeat'
+Plug 'vim-pandoc/vim-pandoc'
+Plug 'vim-pandoc/vim-pandoc-syntax'
 " }}}
 
 " Visual {{{

+ 13 - 0
vim/settings/pandoc.vim

@@ -0,0 +1,13 @@
+" Pandoc files are to explicitly use `.pandoc`.
+" Normal markdown files should not use Pandoc Markdown behaviours.
+let g:pandoc#filetypes#pandoc_markdown = 0
+
+" Pandoc's syntax concealing does fancy character conversions e.g. '...' to
+" proper ellipsis. However, the conceal highlighting often does not work well
+" with the Goyo/Limelight (distraction-free writing) plugins, which otherwise
+" complement Pandoc.
+let g:pandoc#syntax#conceal#use = 0
+
+" Write `docx` versions of `pandoc` files on save.
+let g:pandoc#command#autoexec_on_writes = 1
+let g:pandoc#command#autoexec_command = 'Pandoc docx'