From 7304a4e146c952b8a5c2e2566d25adf1480debd3 Mon Sep 17 00:00:00 2001 From: Poscat Date: Tue, 30 Nov 2021 09:46:54 +0800 Subject: [PATCH] fix: add an option for manually specifying the path to the vim binary refer: #2261 --- autoload/vimtex/view/zathura.vim | 3 ++- doc/vimtex.txt | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/autoload/vimtex/view/zathura.vim b/autoload/vimtex/view/zathura.vim index 393a543170..e0ede248b4 100644 --- a/autoload/vimtex/view/zathura.vim +++ b/autoload/vimtex/view/zathura.vim @@ -110,7 +110,8 @@ endfunction " }}}1 -let s:inverse_search_cmd = get(v:, 'progpath', get(v:, 'progname', '')) +let s:inverse_search_cmd = get(g:, 'vimtex_callback_progpath', + \ get(v:, 'progpath', get(v:, 'progname', ''))) \ . (has('nvim') \ ? ' --headless' \ : ' -T dumb --not-a-term -n') diff --git a/doc/vimtex.txt b/doc/vimtex.txt index 109bdc57d6..774e0bbc90 100644 --- a/doc/vimtex.txt +++ b/doc/vimtex.txt @@ -2927,6 +2927,15 @@ OPTIONS *vimtex-options* Default value: 1 +*g:vimtex_callback_progpath* + The path to the vim binary that will be passed to viewers (for example + Zathura) for synctex callbacks. If unset, vimtex will fallback to use + |v:progpath|. You usually don't have to touch this variable, but if your + vim loads vimtex using a wrapper then it needs to be set otherwise + inverse search calls from viewers won't work. + + Default value: unset + *$VIMTEX_OUTPUT_DIRECTORY* This environment variable allows to specify the output directory of auxiliary LaTeX files. If it exists and is a valid path, this path will be