mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
vimtex conf update
This commit is contained in:
parent
c873572872
commit
8325286097
@ -303,20 +303,17 @@ omap s <Nop>
|
|||||||
"{{ LaTeX editing
|
"{{ LaTeX editing
|
||||||
""""""""""""""""""""""""""""vimtex settings"""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""vimtex settings"""""""""""""""""""""""""""""
|
||||||
if ( g:is_win || g:is_mac ) && executable('latex')
|
if ( g:is_win || g:is_mac ) && executable('latex')
|
||||||
function! SetServerName() abort
|
" Hacks for inverse serach to work semi-automatically,
|
||||||
if has('win32')
|
" see https://jdhao.github.io/2021/02/20/inverse_search_setup_neovim_vimtex/.
|
||||||
let nvim_server_file = $TEMP . '/curnvimserver.txt'
|
function! s:write_server_name() abort
|
||||||
else
|
let nvim_server_file = (has('win32') ? $TEMP : '/tmp') . '/vimtexserver.txt'
|
||||||
let nvim_server_file = '/tmp/curnvimserver.txt'
|
call writefile([v:servername], nvim_server_file)
|
||||||
endif
|
|
||||||
let cmd = printf('echo %s > %s', v:servername, nvim_server_file)
|
|
||||||
call system(cmd)
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
augroup vimtex_common
|
augroup vimtex_common
|
||||||
autocmd!
|
autocmd!
|
||||||
|
autocmd FileType tex call s:write_server_name()
|
||||||
autocmd FileType tex nmap <buffer> <F9> <plug>(vimtex-compile)
|
autocmd FileType tex nmap <buffer> <F9> <plug>(vimtex-compile)
|
||||||
autocmd FileType tex call SetServerName()
|
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
let g:vimtex_compiler_latexmk = {
|
let g:vimtex_compiler_latexmk = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user