diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index da4dfde..c80ca0f 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -149,11 +149,11 @@ augroup nerd_loader \| endif augroup END -" PLUGIN: markdown-group -" unify markdown extensions to all use markdown filetype -au! BufRead,BufNewFile *.markdown set filetype=markdown -au! BufRead,BufNewFile *.md set filetype=markdown -au! BufRead,BufNewFile *.mkd set filetype=markdown +" " PLUGIN: markdown-group +" " unify markdown extensions to all use markdown filetype +" au! BufRead,BufNewFile *.markdown set filetype=markdown +" au! BufRead,BufNewFile *.md set filetype=markdown +" au! BufRead,BufNewFile *.mkd set filetype=markdown " automatically enables markdown plugins for md & txt files function! Prose() @@ -163,18 +163,21 @@ function! Prose() " enable extended sentence textobject use on md and plaintext files call textobj#sentence#init() " hide the markdown cruft - set conceallevel=2 + setlocal conceallevel=2 + setlocal foldlevel=2 endfunction " enable syntax highlighting for codeblocks WITHIN markdown let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'javascipt', 'go'] " call the prose function defined above for any md files -autocmd FileType pandoc,markdown,txt,rmarkdown call Prose() +au FileType pandoc call Prose() + " or invoke it manually by writing :Prose command! -nargs=0 Prose call Prose() " PLUGIN: vim-pandoc " handle markdown files with pandoc (and pandoc syntax!) +let g:pandoc#modules#disabled = ["folding"] let g:pandoc#filetypes#pandoc_markdown = 1 " disable all default keymaps let g:pandoc#keyboard#use_default_mappings=0 @@ -190,7 +193,7 @@ let g:pandoc#biblio#use_preview=1 let g:pandoc#completion#bib#mode='citeproc' let g:pandoc#folding#fold_yaml=1 let g:pandoc#folding#fastfolds=1 -let g:pandoc#folding#level=2 +" let g:pandoc#folding#level=2 let g:pandoc#spell#default_langs=["en_us", "de_de"] let g:pandoc#hypertext#ausosave_on_edit_open_link=1 let g:pandoc#hypertext#create_if_no_alternates_exists=1 @@ -330,7 +333,7 @@ function! s:bibtex_cite_sink_insert(lines) endfunction " insert markdown formatted reference function! s:bibtex_markdown_sink(lines) - let r=system("bibtex-markdown -cache " . g:fzf_bibtex_cache . ' ' . g:fzf_bibtex_sources, a:lines) + let r=system("bibtex-markdown -cache " . g:fzf_bibtex_cache . ' ' . join(g:fzf_bibtex_sources), a:lines) echo join(a:lines, '; ') execute ':normal! i' . r endfunction @@ -665,11 +668,6 @@ noremap N :NV! " FZF git diff noremap gd :FzfGFiles? -" insert a citation of a source using bib ref (uses academia library) -nnoremap c :CiteRef -" insert a pretty printed Markdown version of a reference -nnoremap CM :CitePretty - " Mostly dealing with Prose writing from here on out " Format current Paragraph (esp useful in prose writing) nnoremap q gqap