Major update

This commit is contained in:
Adam Stankiewicz
2014-07-29 13:03:49 +02:00
parent a59f644d49
commit 5f1223fbc5
39 changed files with 886 additions and 387 deletions

View File

@@ -76,9 +76,14 @@ function! s:TOCActivate(close)
execute b:calling_win . 'wincmd w'
let root = fnamemodify(entry['file'], ':h') . '/'
let files = [entry['file']]
for line in filter(readfile(entry['file']), 'v:val =~ ''\\input{''')
call add(files, matchstr(line, '{\zs.*\ze\(\.tex\)\?}') . '.tex')
let file = matchstr(line, '{\zs.\{-}\ze\(\.tex\)\?}') . '.tex'
if file[0] != '/'
let file = root . file
endif
call add(files, file)
endfor
" Find section in buffer (or inputted files)