tex的安装总不用说了
代码: 全选
sudo apt-get install texlive
顺便说一句,7.10下的vim-latexsuite是无法打开的,如果你仅仅安装了vim-latexsuite的话(bug)。所以需要另外加装vim-addon-manager,然后执行
代码: 全选
sudo vim-addons -w latex-suite
然后编辑~/.vimrc,把下面这段复制进去,保存即可。
代码: 全选
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" for LaTeX files
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
au BufEnter *.tex set autowrite "Save before making PDF"
au BufEnter *.tex set updatetime=1000 "Wait 1000 milliseconds (change if you want to)"
au BufEnter *.tex set makeprg=pdflatex\ -halt-on-error\ %\ >/dev/null "make the pdf file, suppress output, don't do anything if there are errors"
"make the file after specified time of not moving and after every save"
au CursorHold *.tex call UpdateFile()
au BufWritePost *.tex call UpdateFile()
" update function
function! UpdateFile()
silent make
silent !evince -w %<.pdf>/dev/null & "refresh the file in evince. -w option keeps focus on vim console"
redraw! "remove artifacts during saves"
endfunction
" run evince at runtime"
au BufRead *.tex silent !evince %<.pdf>/dev/null &
所谓的WYSIWYG latex vim(伪)就做好了,谢谢大家!