1

I am new to vim and I am currently working with the default configuration of vimtex other than setting my viewer to skim. Here is what \li produces with my current vimtex configuration (used a minimal test file)

System info
  2   OS: macOS 11.2.1 (20D74)
  3   Vim version: VIM 8.2 (1-2164)
  4   Has clientserver: true
  5   Servername: undefined (vim started without --servername)
  6 
  7 VimTeX project: test
  8   base: test.tex
  9   root: /Users/ks/Documents
 10   tex: /Users/ks/Documents/test.tex
 11   out: /Users/ks/Documents/test.pdf
 12   log: /Users/ks/Documents/test.log
 13   aux: /Users/ks/Documents/test.aux
 14   fls: /Users/ks/Documents/test.fls
 15   main parser: current file verified
 16   compiler: latexmk
 17     configuration: 
 18       continuous: 1
 19       callback: 1
 20       latexmk options:
 21         -verbose
 22         -file-line-error
 23         -synctex=1
 24         -interaction=nonstopmode
 25       latexmk engine: -pdf
 26   viewer: Skim
 27   qf: LaTeX logfile
 28     addqflist: 57
 29     fix_paths: 58
 30     set_errorformat: 56
 31   document class: amsart
 32   packages:
 33     amsbsy
 34     amsfonts
 35     amsgen
 36     amsmath
 37     amsopn
 38     amstext

How do I make xelatex my default latexmk engine?

I should add that I tried this:

let g:vimtex_compiler_latexmk = { 
         \ 'executable' : 'latexmk',
         \ 'options' : [ 
         \   '-xelatex',
         \   '-file-line-error',
         \   '-synctex=1',
         \   '-interaction=nonstopmode',
         \ ],
         \}

but it does not seem to actually run xelatex. (For example, tex documents with \usepackage{fontspec} don't compile).

Any help would be appreciated! Thank you!

3
  • 1
    For the compiler, i would check the docs (:help vimtex, probably). What’s wrong with search (and what search?)? Are you aware of / and ?? We usually prefer one question per question, so I’m trying to decide if this is a related question or something that should be separate.
    – D. Ben Knoble
    Feb 22, 2021 at 13:59
  • 1
    Re two questions in one, I agree! I will delete the second question (though the search in question is about going back and forth between the source code and the pdf), but I agree it would be better for it to be a separate question!
    – kan
    Feb 22, 2021 at 14:01
  • Re my xelatex question, I tried a number of things none of which seemed to work; I have looked at the documentation too and I could not work out a way to do it!
    – kan
    Feb 22, 2021 at 14:03

1 Answer 1

1

I raised the issue with the the author of the plugin and he suggested the following answer which works:

let g:vimtex_compiler_latexmk_engines = {
    \ '_'                : '-xelatex',
    \}
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.