When I compile a latex file in vim with the vim-latex plugin with \ll usinglatexmk, my vim terminal text content gets littered with error messages like the following dispersed through the text:

(evince:10013): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

It looks to me as if evince dumps its log output into the vim window, can I prevent that somehow?

Solved Thanks to @maxschlepzig, I solved it by adding let g:Tex_ViewRule_pdf = "evince 2>/dev/null"to my ~/.vimrc.


Those messages come from evince. They are emitted when evince detected a PDF file change and it reloads the file.

You can workaround this via redirecting stderr of evince to /dev/null. That means you can search for the evince call in the vim-latex plugin source and replace something like

evince <OPTS> <INPUT>


evince <OPTS> <INPUT> 2>/dev/null

Alternatively, you can place a small wrapper script in your PATH - when running vim with the vim-latex plugin. For example something like this:

$ mkdir -p ~/local/bin
$ cat ~/local/bin/evince
exec /usr/bin/evince "$@" 2>/dev/null
$ chmod 755 ~/local/bin/evince
$ PATH=$HOME/local/bin:$PATH vim some_latex_file

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.