Skip to content

Commit

Permalink
merge(view): option to prevent skim from selecting the text
Browse files Browse the repository at this point in the history
refer: #2766
  • Loading branch information
lervag committed Aug 31, 2023
2 parents 534fd72 + 628429d commit ad17583
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions autoload/vimtex/options.vim
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ function! vimtex#options#init() abort " {{{1
call s:init_option('vimtex_view_skim_activate', 0)
call s:init_option('vimtex_view_skim_sync', 0)
call s:init_option('vimtex_view_skim_reading_bar', 0)
call s:init_option('vimtex_view_skim_no_select', 0)
call s:init_option('vimtex_view_texshop_activate', 0)
call s:init_option('vimtex_view_texshop_sync', 0)
call s:init_option('vimtex_view_zathura_options', '')
Expand Down
1 change: 1 addition & 0 deletions autoload/vimtex/view/skim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ function! s:make_cmd_view(outfile, open, sync) abort " {{{1
\ 'app.documents[0].go({ to: app.texLines[' . (line('.')-1) . '],',
\ 'from: Path("'. expand('%:p') . '")',
\ (g:vimtex_view_skim_reading_bar ? ', showingReadingBar: true' : ''),
\ (g:vimtex_view_skim_no_select ? ', selecting: false' : ''),
\ '});'
\])
endif
Expand Down
7 changes: 7 additions & 0 deletions doc/vimtex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3403,6 +3403,12 @@ OPTIONS *vimtex-options*

Default value: 0

*g:vimtex_view_skim_no_select*
Set this option to 1 to prevent Skim from selecting the text after command
|:VimtexView| or compiler callback.

Default value: 0

*g:vimtex_view_texshop_activate*
Set this option to 1 to make TeXShop have focus after command |:VimtexView| in
addition to being moved to the foreground.
Expand Down Expand Up @@ -5829,6 +5835,7 @@ the text you want to search.
Associated settings:
* |g:vimtex_view_skim_activate|
* |g:vimtex_view_skim_reading_bar|
* |g:vimtex_view_skim_no_select|

*vimtex-view-sumatrapdf*
SumatraPDF ~
Expand Down

0 comments on commit ad17583

Please sign in to comment.