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:
parent
448fe4ad58
commit
2672a92e77
@ -775,9 +775,20 @@ omap s <Nop>
|
||||
"{{ LaTeX editting
|
||||
""""""""""""""""""""""""""""vimtex settings"""""""""""""""""""""""""""""
|
||||
if ( g:is_win || g:is_mac ) && executable('latex')
|
||||
augroup vimtex_map
|
||||
function! SetServerName()
|
||||
if has('win32')
|
||||
let nvim_server_file = $TEMP . '/curnvimserver.txt'
|
||||
else
|
||||
let nvim_server_file = '/tmp/curnvimserver.txt'
|
||||
endif
|
||||
let cmd = printf('echo %s > %s', v:servername, nvim_server_file)
|
||||
call system(cmd)
|
||||
endfunction
|
||||
|
||||
augroup vimtex_common
|
||||
autocmd!
|
||||
autocmd FileType tex nmap <buffer> <F9> <plug>(vimtex-compile)
|
||||
autocmd FileType tex call SetServerName()
|
||||
augroup END
|
||||
|
||||
" Deoplete configurations for autocompletion to work
|
||||
@ -816,13 +827,8 @@ 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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user