home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / compiler / tex.vim < prev    next >
Encoding:
Text File  |  2003-05-30  |  1.6 KB  |  65 lines

  1. " Vim compiler file
  2. " Compiler:     TeX
  3. " Maintainer:   Artem Chuprina <ran@ran.pp.ru>
  4. " Last Change:  2003 May 30
  5.  
  6. if exists("current_compiler")
  7.     finish
  8. endif
  9.  
  10. " If makefile exists and we are not asked to ignore it, we use standard make
  11. " (do not redefine makeprg)
  12. if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') ||
  13.             \(!filereadable('Makefile') && !filereadable('makefile'))
  14.     " If buffer-local variable 'tex_flavor' exists, it defines TeX flavor,
  15.     " otherwize the same for global variable with same name, else it will be
  16.     " LaTeX
  17.     if exists("b:tex_flavor")
  18.         let current_compiler = b:tex_flavor
  19.     elseif exists("g:tex_flavor")
  20.         let current_compiler = g:tex_flavor
  21.     else
  22.         let current_compiler = "latex"
  23.     endif
  24.     let &l:makeprg=current_compiler.' -interaction=nonstopmode'
  25. else
  26.     let current_compiler = 'make'
  27. endif
  28.  
  29. let s:cpo_save = &cpo
  30. set cpo-=C
  31.  
  32. " Value errorformat are taken from vim help, see :help errorformat-LaTeX, with
  33. " addition from Srinath Avadhanula <srinath@fastmail.fm>
  34. setlocal errorformat=%E!\ LaTeX\ %trror:\ %m,
  35.     \%E!\ %m,
  36.     \%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#,
  37.     \%+W%.%#\ at\ lines\ %l--%*\\d,
  38.     \%WLaTeX\ %.%#Warning:\ %m,
  39.     \%Cl.%l\ %m,
  40.     \%+C\ \ %m.,
  41.     \%+C%.%#-%.%#,
  42.     \%+C%.%#[]%.%#,
  43.     \%+C[]%.%#,
  44.     \%+C%.%#%[{}\\]%.%#,
  45.     \%+C<%.%#>%.%#,
  46.     \%C\ \ %m,
  47.     \%-GSee\ the\ LaTeX%m,
  48.     \%-GType\ \ H\ <return>%m,
  49.     \%-G\ ...%.%#,
  50.     \%-G%.%#\ (C)\ %.%#,
  51.     \%-G(see\ the\ transcript%.%#),
  52.     \%-G\\s%#,
  53.     \%+O(%*[^()])%r,
  54.     \%+O%*[^()](%*[^()])%r,
  55.     \%+P(%f%r,
  56.     \%+P\ %\\=(%f%r,
  57.     \%+P%*[^()](%f%r,
  58.     \%+P[%\\d%[^()]%#(%f%r,
  59.     \%+Q)%r,
  60.     \%+Q%*[^()])%r,
  61.     \%+Q[%\\d%*[^()])%r
  62.  
  63. let &cpo = s:cpo_save
  64. unlet s:cpo_save
  65.