From f9b5666a5768408dbb75df0cca242cae4505c9fb Mon Sep 17 00:00:00 2001 From: snailed Date: Mon, 15 Aug 2022 12:10:32 +0000 Subject: [PATCH] Better passing of filenames to shell scripts (#1161) Doing things the way it's intended. This also makes it easier to copy the autocmd to a lua based configuration. --- .config/nvim/init.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 913c478..c6258b3 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -85,10 +85,10 @@ set noshowcmd nnoremap S :%s//g " Compile document, be it groff/LaTeX/markdown/etc. - map c :w! \| !compiler "%" + map c :w! \| !compiler %:p " Open corresponding .pdf/.html or preview - map p :!opout % + map p :!opout %:p " Runs a script that cleans out tex build files whenever I close out of a .tex file. autocmd VimLeave *.tex !texclear %