From 41b7856828234b2807a58c7f985d403a1e45ae33 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 13 Nov 2020 16:35:40 +0100 Subject: Added vim function to auto export ms files to pdf --- .config/nvim/langs.vim | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to '.config/nvim/langs.vim') diff --git a/.config/nvim/langs.vim b/.config/nvim/langs.vim index e70d714..fb936b7 100644 --- a/.config/nvim/langs.vim +++ b/.config/nvim/langs.vim @@ -1,20 +1,19 @@ let g:asmsyntax = 'asm' let perl_include_pod = 1 autocmd BufNewFile,BufRead *.c - \ set - \ filetype=c + \ set filetype=c autocmd BufNewFile,BufRead *.h - \ set - \ filetype=c + \ set filetype=c autocmd BufNewFile,BufRead *.cxx - \ set - \ filetype=cpp + \ set filetype=cpp autocmd BufNewFile,BufRead *.hxx - \ set - \ filetype=cpp + \ set filetype=cpp autocmd FileType fish \ compiler fish autocmd FileType perl \ setlocal com-=:# kp=perldoc\ -f \| compiler perl +autocmd BufWritePost *.ms + \ let pdf=fnamemodify(bufname('%'), ':r') . ".pdf" + \| silent! execute "!nroff % -ms -Tpdf -Kutf8 > " . pdf let g:perl_compiler_force_warnings = 1 -- cgit v1.2.3