aboutsummaryrefslogtreecommitdiff
path: root/core/plugins.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-02-20 00:28:47 +0800
committerjdhao <jdhao@hotmail.com>2021-02-20 00:28:47 +0800
commitffb584ab1ce735c03c99762628940192a12646bf (patch)
treeac2a7f91fddc9103008f5061583f937946170282 /core/plugins.vim
parent7d4411589e008027292a1af6fdeadeca69074aa4 (diff)
Update vimtex settings
Diffstat (limited to 'core/plugins.vim')
-rw-r--r--core/plugins.vim16
1 files changed, 9 insertions, 7 deletions
diff --git a/core/plugins.vim b/core/plugins.vim
index ddb6cba..4bb5961 100644
--- a/core/plugins.vim
+++ b/core/plugins.vim
@@ -769,8 +769,10 @@ omap s <Nop>
"{{ LaTeX editting
""""""""""""""""""""""""""""vimtex settings"""""""""""""""""""""""""""""
if ( g:is_win || g:is_mac ) && executable('latex')
- " Set up LaTeX flavor
- let g:tex_flavor = 'latex'
+ augroup vimtex_map
+ autocmd!
+ autocmd FileType tex nmap <buffer> <F9> <plug>(vimtex-compile)
+ augroup END
" Deoplete configurations for autocompletion to work
call deoplete#custom#var('omni', 'input_patterns', {
@@ -806,12 +808,12 @@ if ( g:is_win || g:is_mac ) && executable('latex')
let g:vimtex_view_general_viewer = '/Applications/Skim.app/Contents/SharedSupport/displayline'
let g:vimtex_view_general_options = '-r @line @pdf @tex'
- " This adds a callback hook that updates Skim after compilation
- let g:vimtex_compiler_callback_hooks = ['UpdateSkim']
-
- function! UpdateSkim(status) abort
- if !a:status | return | endif
+ augroup vimtex_mac
+ autocmd!
+ autocmd User VimtexEventCompileSuccess call UpdateSkim()
+ augroup END
+ function! UpdateSkim() abort
let l:out = b:vimtex.out()
let l:src_file_path = expand('%:p')
let l:cmd = [g:vimtex_view_general_viewer, '-r']