File: test.vim

package info (click to toggle)
vim-vimtex 2.17-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,844 kB
  • sloc: makefile: 360; python: 103
file content (30 lines) | stat: -rw-r--r-- 593 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
set nocompatible
set runtimepath^=../..
filetype plugin on

nnoremap q :qall!<cr>

function! SetCompilerMethod(mainfile)
  if filereadable(a:mainfile)
    for line in readfile(a:mainfile, '', 5)
      if line =~# '^%\s*arara'
        return 'arara'
      endif
    endfor
  endif

  return 'latexmk'
endfunction

let g:vimtex_compiler_method = 'SetCompilerMethod'

silent edit test-arara.tex
if empty($INMAKE) | finish | endif


call assert_equal('arara', b:vimtex.compiler.name)

silent edit test-fallback.tex
call assert_equal('latexmk', b:vimtex.compiler.name)

call vimtex#test#finished()