I have seen some videos on YuoTube where people are doing some cool things with Emacs, e.g. compiling a LaTeX file and viewing it as a pdf from within Emacs. I have also seen a graphviz DOT file compiled and it's PNG viewed within Emacs. Can similar things be done with gvim?
|
Does it really matter whether the preview is inside Vim or external to it? Here's what I do. In my .vimrc, I have:
This causes (g)vim to save the file whenever the cursor moves. In effect, the file is always saved this way. I use the latex-box plugin for writing LaTeX, which uses latexmk to compile. Latexmk can be configured to auto-recompile whenever the file changes. On the left side of my screen I put the gvim window. On the right side, I put a PDF viewer which auto-reloads whenever the PDF changes. (You can use any of several for linux: evince, okular, zathura, xpdf, etc.) The upshot is that the PDF previewer updates as I type. It's not nearly as fast as, say, gummi's live preview, but it's pretty close. It's certainly better than the emacs video you linked to, since unlike that, I don't even have to do anything to compile; gvim's constant saving of the file coupled with latexmk means the file is always compiling as I type, and hence, the PDF preview is always updating. |
|||
|
|
|
No. Within gvim you can compile a file and display the results with an external viewer in its own window, but not within a gvim window. |
|||
|
|