1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Update vimtex settings

This commit is contained in:
jdhao 2021-02-20 01:50:30 +08:00
parent c238468658
commit 0571ce406d

View File

@ -802,7 +802,6 @@ if ( g:is_win || g:is_mac ) && executable('latex')
let g:vimtex_view_general_options = '-reuse-instance -forward-search @tex @line @pdf'
endif
" The following code is adapted from https://gist.github.com/skulumani/7ea00478c63193a832a6d3f2e661a536.
if g:is_mac
" let g:vimtex_view_method = "skim"
let g:vimtex_view_general_viewer = '/Applications/Skim.app/Contents/SharedSupport/displayline'
@ -811,8 +810,14 @@ if ( g:is_win || g:is_mac ) && executable('latex')
augroup vimtex_mac
autocmd!
autocmd User VimtexEventCompileSuccess call UpdateSkim()
autocmd FileType tex call SetServerName()
augroup END
function! SetServerName()
call system('echo ' . v:servername . ' > /tmp/curvimserver')
endfunction
" The following code is adapted from https://gist.github.com/skulumani/7ea00478c63193a832a6d3f2e661a536.
function! UpdateSkim() abort
let l:out = b:vimtex.out()
let l:src_file_path = expand('%:p')