diff --git a/autoload/vimtex/options.vim b/autoload/vimtex/options.vim index b295311e1d..bab5912c07 100644 --- a/autoload/vimtex/options.vim +++ b/autoload/vimtex/options.vim @@ -426,6 +426,7 @@ function! vimtex#options#init() abort " {{{1 call s:init_option('vimtex_view_mupdf_send_keys', '') call s:init_option('vimtex_view_sioyek_exe', 'sioyek') call s:init_option('vimtex_view_skim_activate', 0) + call s:init_option('vimtex_view_skim_latexmk_previewer', 'open -a Skim') call s:init_option('vimtex_view_skim_reading_bar', 1) call s:init_option('vimtex_view_zathura_options', '') call s:init_option('vimtex_view_zathura_check_libsynctex', 1) diff --git a/autoload/vimtex/view/skim.vim b/autoload/vimtex/view/skim.vim index d464eab343..ed407ba56f 100644 --- a/autoload/vimtex/view/skim.vim +++ b/autoload/vimtex/view/skim.vim @@ -13,7 +13,6 @@ endfunction let s:viewer = vimtex#view#_template#new({ \ 'name' : 'Skim', - \ 'startskim' : 'open -a Skim', \}) function! s:viewer.compiler_callback(outfile) dict abort " {{{1 @@ -74,7 +73,7 @@ endfunction " }}}1 function! s:viewer._latexmk_append_argument() dict abort " {{{1 - return vimtex#compiler#latexmk#wrap_option('pdf_previewer', self.startskim) + return vimtex#compiler#latexmk#wrap_option('pdf_previewer', g:vimtex_view_skim_latexmk_previewer) endfunction " }}}1 diff --git a/doc/vimtex.txt b/doc/vimtex.txt index 9a4bdceab4..497a795de3 100644 --- a/doc/vimtex.txt +++ b/doc/vimtex.txt @@ -2927,6 +2927,16 @@ OPTIONS *vimtex-options* Default value: 0 +*g:vimtex_view_skim_latexmk_previewer* + Command passed to `latexmk` to be used as the PDF previewer (i.e. the + `$pdf_previewer` variable for `latexmk`). This defaults to `'open -a Skim'`, + which means that `latexmk` will open Skim and give it focus after + successfully producing a PDF. If the focusing is unwanted, this can be + set to `'open -a Skim -g'`, which will open Skim but leave it in the + background. + + Default value: `'open -a Skim'` + *g:vimtex_view_skim_reading_bar* Set this option to 1 to highlight current line in PDF after command |:VimtexView|. @@ -5202,6 +5212,7 @@ the text you want to search. Associated settings: * |g:vimtex_view_skim_activate| +* |g:vimtex_view_skim_activate_on_start| * |g:vimtex_view_skim_reading_bar| *vimtex-view-sumatrapdf*