[nvim] Set all markdown-like documents to pandoc

Whenever I write markdown, I want it to be interpreted by pandoc rather
than markdown itself. I write the pandoc flavor of md, I want the pandoc
plugin to handle the files, and I want to enable citations and
compilation in every markdown file.
This commit is contained in:
Marty Oehme 2020-05-26 17:40:45 +02:00
parent 96475bcbaa
commit 701d97389b
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A
3 changed files with 11 additions and 6 deletions

View file

@ -11,8 +11,6 @@ function! s:Prose()
setlocal conceallevel=2 setlocal conceallevel=2
setlocal foldlevel=2 setlocal foldlevel=2
endfunction endfunction
" enable syntax highlighting for codeblocks WITHIN markdown
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'javascipt', 'go']
" invoke it manually by writing :Prose " invoke it manually by writing :Prose
" or, it will get automatically sourced for certain filetypes in " or, it will get automatically sourced for certain filetypes in

View file

@ -63,7 +63,7 @@ Plug 'edkolev/tmuxline.vim'
" Colorschemes " Colorschemes
Plug 'chriskempson/base16-vim' Plug 'chriskempson/base16-vim'
Plug 'reedes/vim-colors-pencil' Plug 'reedes/vim-colors-pencil'
Plug 'rakr/vim-togglebg'
" RMarkdown & LaTeX workflow " RMarkdown & LaTeX workflow
Plug 'vim-pandoc/vim-pandoc-syntax' Plug 'vim-pandoc/vim-pandoc-syntax'
Plug 'vim-pandoc/vim-pandoc' Plug 'vim-pandoc/vim-pandoc'
@ -77,9 +77,9 @@ Plug 'ron89/thesaurus_query.vim' " find thesaurus backed synonyms for word under
Plug 'kana/vim-textobj-user' " dependency for most other textobj plugins Plug 'kana/vim-textobj-user' " dependency for most other textobj plugins
Plug 'reedes/vim-textobj-sentence' " extends the capabilities of sentence detection Plug 'reedes/vim-textobj-sentence' " extends the capabilities of sentence detection
" and allows you to jump to the *end* of this <g)> or last <g(> sentence. " and allows you to jump to the *end* of this <g)> or last <g(> sentence.
Plug 'reedes/vim-pencil', { 'for': ['markdown', 'txt'], 'on': 'Goyo' } " provide md convenience functions like hard/softwrap Plug 'reedes/vim-pencil', { 'for': ['pandoc', 'markdown', 'txt'], 'on': 'Goyo' } " provide md convenience functions like hard/softwrap
Plug 'junegunn/goyo.vim', { 'for': ['markdown', 'txt'], 'on': 'Goyo' } " provide distraction free writing Plug 'junegunn/goyo.vim', { 'for': ['pandoc', 'markdown', 'txt'], 'on': 'Goyo' } " provide distraction free writing
Plug 'junegunn/limelight.vim', { 'for': ['markdown', 'txt'], 'on': 'Goyo' } " provide even distraction free-er writing (lowlight paragraphs) Plug 'junegunn/limelight.vim', { 'for': ['pandoc', 'markdown', 'txt'], 'on': 'Goyo' } " provide even distraction free-er writing (lowlight paragraphs)
" Language Integration " Language Integration
Plug 'sheerun/vim-polyglot' " syntax plugins for almost every language Plug 'sheerun/vim-polyglot' " syntax plugins for almost every language
Plug 'stephpy/vim-yaml' Plug 'stephpy/vim-yaml'

View file

@ -0,0 +1,7 @@
" PLUGIN: vim-polyglot
"
" we disable markdown so that every markdown file can be given pandoc type
let g:polyglot_disabled = ['markdown']
au BufNewFile,BufRead *.{md,mdown,mkd,mkdn,markdown,mdwn} set ft=pandoc
au BufNewFile,BufRead *.{md,mdown,mkd,mkdn,markdown,mdwn}.{des3,des,bf,bfa,aes,idea,cast,rc2,rc4,rc5,desx} set ft=pandoc