How do I get rid of vim-latex's output from PDF viewing?

I use vim with VIM-LaTeX. I can use \ll to compile and \lv to view. I've set the following options in my .vimrc file:

let g:tex_flavor='latex'
let g:Tex_DefaultTargetFormat='pdf'


When I type \lv, it opens the (previously generated) PDF in evince, as desired. However, when I quit evince, my vim window (not the buffer itself) is overwritten with some of evince's exit messages. For example, with a window like this:

\documentclass{article}
\begin{document}
Hello, world!
\end{document}
~
~


pressing \lv and then quitting evince yields this:

Running :redraw! fixes it, but :redraw doesn't.

How can I prevent this behavior?

I've found a solution but would like to know if there's a better one.

Adding the following to the .vimrc fixes it:

let g:Tex_ViewRule_pdf='evince 2>/dev/null'


This redirects evince's error stream to the "black hole" device file.

• I get this error even if I open evince from the terminal, which doesn't get fixed by this. What can I do in that case? – Konrad Höffner May 14 at 7:59
• @KonradHöffner: It’s not really a problem at a terminal, because you’re in cooked mode, but you can still run evince foo.pdf 2>/dev/null. – wchargin May 15 at 6:02