From 894c23169817e15b899c92b64abfca7472c66a1a Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 20 May 2018 15:25:40 -0400 Subject: remove some latex editing features i no longer use --- vim/ftplugin/tex.vim | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'vim') diff --git a/vim/ftplugin/tex.vim b/vim/ftplugin/tex.vim index ef754e9..c600070 100644 --- a/vim/ftplugin/tex.vim +++ b/vim/ftplugin/tex.vim @@ -3,23 +3,9 @@ let b:tex_flavor="latex" " :make converts to pdf setlocal makeprg=(cd\ /tmp\ &&\ pdflatex\ --synctex=1\ --halt-on-error\ %:p) -" xpdf needs to be manually refreshed when the file changes -function! s:xpdf() - if s:is_running('xpdf -remote localhost') - call system('xpdf -remote localhost -reload') - return - endif - call system('xpdf -remote localhost ' . s:current_pdf() . ' &') -endfunction - -" evince treats opening the same file twice as meaning 'reload' -function! s:evince() - call system('evince ' . s:current_pdf() . ' &') -endfunction - -" zathura automatically reloads function! s:zathura() if s:is_running('^zathura') + " zathura automatically reloads return endif call remote_startserver("vim-zathura") @@ -62,33 +48,14 @@ function! s:make_errors() return 0 endfunction -let b:automake_enabled = 0 -function! s:automake() - let old_shellpipe = &shellpipe - let &shellpipe = '>' - try - silent make! - finally - let &shellpipe = old_shellpipe - endtry -endfunction - augroup _tex autocmd! if executable('zathura') && strlen(expand('$DISPLAY')) autocmd QuickFixCmdPost make if !s:make_errors() | call s:zathura() | endif - elseif executable('xpdf') && strlen(expand('$DISPLAY')) - autocmd QuickFixCmdPost make if !s:make_errors() | call s:xpdf() | endif - elseif executable('evince') && strlen(expand('$DISPLAY')) - autocmd QuickFixCmdPost make if !s:make_errors() | call s:evince() | endif endif - autocmd CursorHold,CursorHoldI,InsertLeave if b:automake_enabled | call s:automake() | endif autocmd CursorMoved call Synctex() augroup END -noremap :let b:automake_enabled = !b:automake_enabled -inoremap :let b:automake_enabled = !b:automake_enabled - " see :help errorformat-LaTeX setlocal errorformat= \%E!\ LaTeX\ %trror:\ %m, -- cgit v1.2.3-54-g00ecf