Add configurations for latexmk to work with minted, change pdf viewer.

This commit is contained in:
nnduc 2024-12-01 08:28:22 +00:00
parent 4f9b8e72d1
commit f60741837c

View File

@ -40,7 +40,9 @@ call plug#end()
"set background=light "set background=light
colorscheme gruvbox colorscheme gruvbox
let g:gruvbox_contrast_light = 'hard' let g:gruvbox_contrast_light = 'hard'
let g:vimtex_view_general_viewer = 'okular'
let g:vimtex_view_method = 'mupdf'
let g:vimtex_compiler_latexmk= {'options' : ['-pdf', '-shell-escape', '-verbose', '-file-line-error', '-synctex=1', '-interaction=nonstopmode',],}
"Open NERDTree "Open NERDTree
:nnoremap <silent> <expr> <F2> g:NERDTree.IsOpen() ? "\:NERDTreeClose<CR>" : bufexists(expand('%')) ? "\:NERDTreeFind<CR>" : "\:NERDTree<CR>" :nnoremap <silent> <expr> <F2> g:NERDTree.IsOpen() ? "\:NERDTreeClose<CR>" : bufexists(expand('%')) ? "\:NERDTreeFind<CR>" : "\:NERDTree<CR>"
@ -162,7 +164,24 @@ augroup fcitxHandler
autocmd InsertEnter * silent call FcitxOn() autocmd InsertEnter * silent call FcitxOn()
autocmd InsertLeave * silent call FcitxOff() autocmd InsertLeave * silent call FcitxOff()
augroup END augroup END
let g:vimtex_view_general_viewer = 'okular'
"For vimtex
let g:vimtex_view_method = 'mupdf'
let g:compiler = vimtex#compiler#_template#new({
\ 'name' : 'latexmk',
\ 'aux_dir': '',
\ 'callback' : 1,
\ 'continuous': 1,
\ 'executable' : 'latexmk',
\ 'options' : [
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ '-shell-escape',
\ ],
\})
map <F3> :ALEToggle<CR> map <F3> :ALEToggle<CR>
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux. "Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.