Loading ...
Sorry, an error occurred while loading the content.

Re: Keeping latex message after compilation

Expand Messages
  • David Patrick Henderson
    ... One can recall such messages by using :messages command; also, I would consider setting the makeprg value to your pdflatex command and mapping to
    Message 1 of 4 , Sep 30, 2010
    • 0 Attachment
      On 29 Sep 2010, at 18:19, Byungchul Cha 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.
      >
      > Thanks.

      One can recall such messages by using :messages command; also, I would consider setting the 'makeprg' value to your pdflatex command and mapping <F5> to :make instead

      Dave H
      --
      "Never attribute to malice that which can be adequately explained by stupidity."
      -- Robert J. Hanlon

      --
      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
    • björn
      ... 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
      Message 2 of 4 , Oct 1, 2010
      • 0 Attachment
        On 30 September 2010 03:19, Byungchul Cha <cha3920@...> 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
      • David Patrick Henderson
        ... I use pdflatex --shell-escape --synctex=1 --interaction=nonstopmode $* in my compiler argument to latex-suite, adding the synctex and using Skim.app, one
        Message 3 of 4 , Oct 1, 2010
        • 0 Attachment
          On 01 Oct 2010, at 13:30, björn wrote:

          > " Set 'makeprg' so that you can use Cmd+B to compile
          > setl makeprg=pdflatex\ -interaction=nonstopmode\ %

          I use 'pdflatex --shell-escape --synctex=1 --interaction=nonstopmode $*' in my compiler argument to latex-suite, adding the synctex and using Skim.app, one can achieve behavior very like TexShop's where one can double click at a point in the pdf and have it return one to the appropriate spot in the tex file; the secret sauce being to set Skim's sync facility to invoke mvim with args '-c ":RemoteOpen +%line %file"' making it easy to correct errors in one's text. The pdflatex command may need some tweaking if not using latex-suite but should still be workable

          Dave
          --
          "To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public."
          -- Theodore Roosevelt

          --
          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
        Your message has been successfully submitted and would be delivered to recipients shortly.