7

I'm using LaTeX in Vim with plugins vimtex from lervag (GitHub link), latexmk and neovim, and it works just fine as long as I'm making no mistakes.

I press \ll and compile by writing (:w) and the pdf is updated if there is no mistake; however, if I have an error in my code, the pdf just does not update, and I get no error message or anything. I checked Vim :messages, and nothing there either...

Does anyone know how to have a compilation log with these plugins (or if I should add another plugin), or at least a way to diplay error messages (and maybe warnings)?

Thanks in advance!

  • Did you try opening the compiler quickfix window? (try help copen) – Thruston Jul 21 '18 at 22:41
  • 1
    or using the \le command to parse the error log? (as mentioned on that link you give...) – Thruston Jul 21 '18 at 22:43
  • 2
    \le command is what I was looking for, thank you so much! I need to get better at reading REAMEs... Problem solved! – Ul Tome Jul 23 '18 at 9:34
  • Good. But I think we should probably close this question as off topic for TEX.se – Thruston Jul 23 '18 at 9:35
2

The vimtex plugin populates the quick fix view with the errors. It should actually open automatically (by default) in a bottom split-window. It is weird that it does not for you. Invoking :copen directly should open the window. Also [q and ]q should let you iterate between errors (but this does not work very well for latex as it is hard to filter spurious and non-spurious messages in the log; LaTeX's log is a mess, in comparison to most compilers).

1

The best way is to use \le, and here is a full list of command of vimtex (from the official document)

---------------------------------------------------------------------~
   LHS              RHS                                          MODE~
  ---------------------------------------------------------------------~
   <localleader>li  |<plug>(vimtex-info)|                           `n`
   <localleader>lI  |<plug>(vimtex-info-full)|                      `n`
   <localleader>lt  |<plug>(vimtex-toc-open)|                       `n`
   <localleader>lT  |<plug>(vimtex-toc-toggle)|                     `n`
   <localleader>lq  |<plug>(vimtex-log)|                            `n`
   <localleader>lv  |<plug>(vimtex-view)|                           `n`
   <localleader>lr  |<plug>(vimtex-reverse-search)|                 `n`
   <localleader>ll  |<plug>(vimtex-compile)|                        `n`
   <localleader>lL  |<plug>(vimtex-compile-selected)|               `nx`
   <localleader>lk  |<plug>(vimtex-stop)|                           `n`
   <localleader>lK  |<plug>(vimtex-stop-all)|                       `n`
   <localleader>le  |<plug>(vimtex-errors)|                         `n`
   <localleader>lo  |<plug>(vimtex-compile-output)|                 `n`
   <localleader>lg  |<plug>(vimtex-status)|                         `n`
   <localleader>lG  |<plug>(vimtex-status-all)|                     `n`
   <localleader>lc  |<plug>(vimtex-clean)|                          `n`
   <localleader>lC  |<plug>(vimtex-clean-full)|                     `n`
   <localleader>lm  |<plug>(vimtex-imaps-list)|                     `n`
   <localleader>lx  |<plug>(vimtex-reload)|                         `n`
   <localleader>lX  |<plug>(vimtex-reload-state)|                   `n`
   <localleader>ls  |<plug>(vimtex-toggle-main)|                    `n`
   dse              |<plug>(vimtex-env-delete)|                     `n`
   dsc              |<plug>(vimtex-cmd-delete)|                     `n`
   ds$              |<plug>(vimtex-env-delete-math)|                `n`
   dsd              |<plug>(vimtex-delim-delete)|                   `n`
   cse              |<plug>(vimtex-env-change)|                     `n`
   csc              |<plug>(vimtex-cmd-change)|                     `n`
   cs$              |<plug>(vimtex-env-change-math)|                `n`
   csd              |<plug>(vimtex-delim-change-math)|              `n`
   tsc              |<plug>(vimtex-cmd-toggle-star)|                `n`
   tse              |<plug>(vimtex-env-toggle-star)|                `n`
   tsd              |<plug>(vimtex-delim-toggle-modifier)|          `nx`
   tsD              |<plug>(vimtex-delim-toggle-modifier-reverse)|  `nx`
   <F7>             |<plug>(vimtex-cmd-create)|                     `nxi`
   ]]               |<plug>(vimtex-delim-close)|                    `i`
   ac               |<plug>(vimtex-ac)|                             `xo`
   ic               |<plug>(vimtex-ic)|                             `xo`
   ad               |<plug>(vimtex-ad)|                             `xo`
   id               |<plug>(vimtex-id)|                             `xo`
   ae               |<plug>(vimtex-ae)|                             `xo`
   ie               |<plug>(vimtex-ie)|                             `xo`
   a$               |<plug>(vimtex-a$)|                             `xo`
   i$               |<plug>(vimtex-i$)|                             `xo`
   aP               |<plug>(vimtex-aP)|                             `xo`
   iP               |<plug>(vimtex-iP)|                             `xo`
   %                |<plug>(vimtex-%)|                              `nxo`
   ]]               |<plug>(vimtex-]])|                             `nxo`
   ][               |<plug>(vimtex-][)|                             `nxo`
   []               |<plug>(vimtex-[])|                             `nxo`
   [[               |<plug>(vimtex-[[)|                             `nxo`
   ]m               |<plug>(vimtex-]m)|                             `nxo`
   ]M               |<plug>(vimtex-]M)|                             `nxo`
   [m               |<plug>(vimtex-[m)|                             `nxo`
   [M               |<plug>(vimtex-[M)|                             `nxo`
   ]/               |<plug>(vimtex-]/|                              `nxo`
   ]*               |<plug>(vimtex-]star|                           `nxo`
   [/               |<plug>(vimtex-[/|                              `nxo`
   [*               |<plug>(vimtex-[star|                           `nxo`
   K                |<plug>(vimtex-doc-package)|                    `n`
  ---------------------------------------------------------------------~

And if you forgot them when you're using vim, you can actually type :nn when editing a tex file to see the same thing The result of typing :nn

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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