tags:

views:

109

answers:

1

I just started using Vim-Latex. The default dvi output didn't work for me, so I changed the default to pdf by adding "let g:Tex_DefaultTargetFormat = 'pdf'" to my tex.vim. The only problem is that I need to save my document first (:w) before compiling it (\ll) and viewing in in Evince (\lv). If I do not save it, and run \ll and \lv, latex is run on the saved file before I started editing it, and not on the buffer containing my edited file. How do I make it so that vim saves my file and compiles my document when I hit \ll? Thanks!

+1  A: 

this is not the perfect solution but it will work, define a new map in your .vimrc:

map <f2> :w<cr><leader>ll

this works but there should exist a cleaner way of doing this.

skeept
Great! This works. Perhaps there is a cleaner way of doing this... or maybe my Latex is misconfigured on my system. But this solve my problem! Thanks!
hwong557