diff options
-rw-r--r-- | nvim/after/ftplugin/tex/mappings.vim | 39 | ||||
-rw-r--r-- | nvimrc | 21 |
2 files changed, 40 insertions, 20 deletions
diff --git a/nvim/after/ftplugin/tex/mappings.vim b/nvim/after/ftplugin/tex/mappings.vim index c0f7036..e7dd610 100644 --- a/nvim/after/ftplugin/tex/mappings.vim +++ b/nvim/after/ftplugin/tex/mappings.vim @@ -31,20 +31,29 @@ iabbrev <buffer> gp \pi iabbrev <buffer> gw \omega iabbrev <buffer> dd \d -function! SynctexShow() - let synctex = glob("*.synctex.gz") - if strlen(synctex) == 0 - echom "no synctex file found" - else - let pdffile = substitute(synctex,"synctex.gz","pdf","") - let execline = printf(":!zathura --synctex-forward %d:%d:%s %s", line('.'), col('.'), shellescape(bufname("%")), shellescape(pdffile)) - exec execline - end -endfunction +" function! SynctexShow() +" let synctex = glob("*.synctex.gz") +" if strlen(synctex) == 0 +" echom "no synctex file found" +" else +" let pdffile = substitute(synctex,"synctex.gz","pdf","") +" let execline = printf(":!zathura --synctex-forward %d:%d:%s %s", line('.'), col('.'), shellescape(bufname("%")), shellescape(pdffile)) +" exec execline +" end +" endfunction -nnoremap <buffer> <LocalLeader>a :call SynctexShow()<CR><CR> -nnoremap <buffer> <LocalLeader>i :Latexmk<CR> -nnoremap <buffer> <LocalLeader>e :LatexErrors<CR> -nnoremap <buffer> <LocalLeader>o :LatexView<CR> -noremap <buffer> <LocalLeader>k :LatexmkStop<CR>:LatexmkClean<CR> +" nnoremap <buffer> <LocalLeader>a :call SynctexShow()<CR><CR> +" nnoremap <buffer> <LocalLeader>i :Latexmk<CR> +" nnoremap <buffer> <LocalLeader>e :LatexErrors<CR> +" nnoremap <buffer> <LocalLeader>o :LatexView<CR> +" noremap <buffer> <LocalLeader>k :LatexmkStop<CR>:LatexmkClean<CR> +" nnoremap <buffer> <LocalLeader>h :split header.sty<CR> + + +nnoremap <buffer> <LocalLeader>i :VimtexCompile<CR> +nnoremap <buffer> <LocalLeader>e :VimtexErrors<CR> +nnoremap <buffer> <LocalLeader>o :VimtexView<CR> +nnoremap <buffer> <LocalLeader>k :VimtexStop<CR>:VimtexClean<CR> +nnoremap <buffer> <LocalLeader>t :VimtexTocToggle<CR> +nnoremap <buffer> <LocalLeader>h :split header.sty<CR> nnoremap <buffer> <LocalLeader>h :split header.sty<CR> @@ -22,7 +22,8 @@ Plug 'junegunn/rainbow_parentheses.vim' Plug 'justinmk/vim-sneak' Plug 'kassio/neoterm', { 'on' : 'T' } Plug 'kien/ctrlp.vim' -Plug 'LaTeX-Box-Team/latex-box', { 'for' : 'tex' } +" Plug 'LaTeX-Box-Team/latex-box', { 'for' : 'tex' } +Plug 'lervag/vimtex', { 'for' : 'tex' } Plug 'majutsushi/tagbar' Plug 'mileszs/ack.vim', { 'on' : 'Ack' } Plug 'rdnetto/YCM-Generator', { 'branch' : 'stable' , 'on' : 'YcmGenerateConfig' } @@ -51,10 +52,20 @@ Plug 'xolox/vim-notes', { 'on' : 'Note' } call plug#end() "" Plugins options -let g:LatexBox_fold_automatic=0 -let g:LatexBox_latexmk_preview_continuously=1 -let g:LatexBox_quickfix=2 -let g:LatexBox_viewer='zathura' +" let g:LatexBox_fold_automatic=0 +" let g:LatexBox_latexmk_preview_continuously=1 +" let g:LatexBox_quickfix=2 +" let g:LatexBox_viewer='zathura' +let g:vimtex_fold_enabled=0 +let g:vimtex_view_method='zathura' +let g:vimtex_latexmk_continuous=1 +let g:vimtex_quickfix_mode=0 +if !exists('g:ycm_semantic_triggers') + let g:ycm_semantic_triggers = {} +endif +let g:ycm_semantic_triggers.tex = [ + \ 're!\\[A-Za-z]*(ref|cite)[A-Za-z]*([^]]*])?{([^}]*, ?)*' + \ ] let g:UltiSnipsEditSplit="horizontal" let g:UltiSnipsExpandTrigger="<tab>" |