3

I have installed the Vim-LaTeX plugin, which is great for editing LaTeX documents in Vim. However, I have one problem with viewing the output file.

The tutorial says to use the \lv command. However, when I try that, it tries to open foo.dvi with evince, which happens to fail spectacularly:

evince failure

This is strange, though, since the docs say that xdvi should be the default DVI viewer in the first place. Anyway, I tried setting it as the default:

:let g:Tex_ViewRule_dvi = 'xdvi'

This had absolutely no effect. When I tried

:!xdvi foo.dvi

it worked perfectly, but I would prefer the easier \lv shortcut instead.

How can I solve this problem? I'm running Ubuntu 14.04 with Vim 7.4.

2
  • What happens if you double-click a .dvi file in nautilus? Maybe the MIME associations are messed up... (just a shot in the dark, I use LaTeX-Box and not Vim-LaTeX so I can't check).
    – Rmano
    Aug 1, 2014 at 10:13
  • @Rmano Spot on - I changed the association with mimeopen and that fixed it. Thanks! (you can add that as an answer, so I can accept it)
    – Doorknob
    Aug 1, 2014 at 10:36

1 Answer 1

2

If Vim-LaTeX is using the standard MIME database for opening the .dvi file, the problem could be that the default association is wrong. I have a couple of system where .dvi files where associated with evince that is not able to open them.

You can check which application is the default one for opening a file with, for example, Ubuntu Tweak, in Admin->File Type Manager:

enter image description here

And adding xdvi if it is missing:

enter image description here

Or using the command-line mimeopen:

[romano:~/tmp] 130 % mimeopen test.dvi   
Please choose a default application for files of type application/x-dvi

    1) Print Preview  (evince-previewer)
    2) Document Viewer  (evince)
    3) Other...

use application #3
use command: xdvi
Opening "test.dvi" with xdvi  (application/x-dvi)

which will change the default too.

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.