summaryrefslogtreecommitdiffstats
path: root/vim
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-05-20 15:25:40 -0400
committerJesse Luehrs <doy@tozt.net>2018-05-20 15:25:49 -0400
commit894c23169817e15b899c92b64abfca7472c66a1a (patch)
tree9e7d0f5020cf02bb3453cc90a10a8b95099e648a /vim
parent666488e32463231ebb857d6480dd8f520c622199 (diff)
downloadconf-894c23169817e15b899c92b64abfca7472c66a1a.tar.gz
conf-894c23169817e15b899c92b64abfca7472c66a1a.zip
remove some latex editing features i no longer use
Diffstat (limited to 'vim')
-rw-r--r--vim/ftplugin/tex.vim35
1 files changed, 1 insertions, 34 deletions
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 <buffer> if b:automake_enabled | call s:automake() | endif
autocmd CursorMoved <buffer> call Synctex()
augroup END
-noremap <buffer> <silent><F6> :let b:automake_enabled = !b:automake_enabled<CR><F5>
-inoremap <buffer> <silent><F6> <C-O>:let b:automake_enabled = !b:automake_enabled<CR><C-O><F5>
-
" see :help errorformat-LaTeX
setlocal errorformat=
\%E!\ LaTeX\ %trror:\ %m,