From 804ae4005a55328099341d3c0d8e185ba5e58d20 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 4 Feb 2020 20:38:47 +0100 Subject: [PATCH] Fix Document Compile Function in vim Fixed non-escaped directory sequence (erroring on spaces in filenames) and silent code execution. --- nvim/.config/nvim/plugin/personal/doccompile.vim | 12 ++++++------ nvim/.config/nvim/plugin/vim-pandoc.vim | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/nvim/.config/nvim/plugin/personal/doccompile.vim b/nvim/.config/nvim/plugin/personal/doccompile.vim index 0170a38..5e0189e 100644 --- a/nvim/.config/nvim/plugin/personal/doccompile.vim +++ b/nvim/.config/nvim/plugin/personal/doccompile.vim @@ -1,23 +1,23 @@ function s:_compile(verbose, ...) :execute(":w!") if a:verbose - execute "!" . "compile" . " " . "%" . " " . join(a:000) + execute "!" . "compile" . " " . "\"%\"" . " " . join(a:000) else - silent "!" . "compile" . " " . "%" . " " . join(a:000) + silent execute "!" . "compile" . " " . "\"%\"" . " " . join(a:000) endif endfunction function s:_open(verbose, ...) if a:verbose - execute "!" . "open-compiled" . " " . "%" . " " . join(a:000) + execute "!" . "open-compiled" . " " . "\"%\"" . " " . join(a:000) else - silent "!" . "open-compiled" . " " . "%" . " " . join(a:000) + silent execute "!" . "open-compiled" . " " . "\"%\"" . " " . join(a:000) endif endfunction function s:_compileopen(verbose, ...) - call s:_compile(0, ) - call s:_open(0, ) + call s:_compile(a:verbose, join(a:000)) + call s:_open(a:verbose, join(a:000)) endfunction command -bang -nargs=* DocCompile call s:_compile(0, ) diff --git a/nvim/.config/nvim/plugin/vim-pandoc.vim b/nvim/.config/nvim/plugin/vim-pandoc.vim index 0be5c1f..c217927 100644 --- a/nvim/.config/nvim/plugin/vim-pandoc.vim +++ b/nvim/.config/nvim/plugin/vim-pandoc.vim @@ -1,5 +1,6 @@ " PLUGIN: vim-pandoc " handle markdown files with pandoc (and pandoc syntax!) +let g:pandoc#modules#disabled = [ "keyboard", "folding" ] let g:pandoc#filetypes#pandoc_markdown = 1 let g:pandoc#filetypes#handled = [ "extra", "latex", "markdown", "pandoc", "rst", "textile" ] " disable all default keymaps