On 30 September 2010 03:19, Byungchul Cha <[email protected]> wrote:
> Hi.
>
> I use vim for editing my latex file, but I do not use the vim-latex
> suite. I have the following line
>
> :map <F5> :w <CR> :!pdflatex --shell-escape % <CR> :!open -a Skim.app
> %<.pdf <CR>
>
> in my .vimrc file. This works for me when I use vim in terminal.
>
> I have the same line above in .gvimrc, but, there is an issue when I
> use MacVim. The problem for me is that MacVim does not show the latex
> compiling message after compilation and opens Skim. (Well,
> technically, it does show the mesage but it disappears fast as it
> opens Skim next.) I would like to glance the message before I go back
> to editing.
>
> I do not have this problem when I use vim in terminal, so, I suppose
> there must be a way to fix this.
Due to the way MacVim queues rendering instructions it is very
difficult to get the exact same behavior as in console Vim.
I seconds Dave's suggestions of setting makeprg instead, then you can
use Cmd+B to compile. Here's an excerpt from my ftplugin/tex.vim
file:
" Set 'makeprg' so that you can use Cmd+B to compile
setl makeprg=pdflatex\ -interaction=nonstopmode\ %
" taken from ':h errorformat-latex'
setl efm=%E!\ LaTeX\ %trror:\ %m,
\%E!\ %m,
\%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#,
\%+W%.%#\ at\ lines\ %l--%*\\d,
\%WLaTeX\ %.%#Warning:\ %m,
\%Cl.%l\ %m,
\%+C\ \ %m.,
\%+C%.%#-%.%#,
\%+C%.%#[]%.%#,
\%+C[]%.%#,
\%+C%.%#%[{}\\]%.%#,
\%+C<%.%#>%.%#,
\%C\ \ %m,
\%-GSee\ the\ LaTeX%m,
\%-GType\ \ H\ <return>%m,
\%-G\ ...%.%#,
\%-G%.%#\ (C)\ %.%#,
\%-G(see\ the\ transcript%.%#),
\%-G\\s%#,
\%+O(%f)%r,
\%+P(%f%r,
\%+P\ %\\=(%f%r,
\%+P%*[^()](%f%r,
\%+P[%\\d%[^()]%#(%f%r,
\%+Q)%r,
\%+Q%*[^()])%r,
\%+Q[%\\d%*[^()])%r
" Use <Leader>v to view pdf
map <buffer> <Leader>v :!open %:p:r.pdf<CR>
Note that with the above settings you can also use Cmd+Ctrl+Left/Right
to step between the errors.
Björn
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php