Re: [Vim-latex-devel] Compiling parts of a doc using \includesonly{...}
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2004-06-07 17:26:47
|
On Mon, 7 Jun 2004, Sebastian Menge wrote: > Would it be possible for latexsuite to place \includesonly{thisfile} > into the praeamble before compiling when im editing thisfile.tex at the > moment? I don't know if this is something which is appropriate for latex-suite to include by default. However, it should be easy enough to do something specifically for yourself. Example: nmap <leader>ll :call InsertIncludesOnly()<CR><Plug>Tex_Compile where InsertIncludesOnly() is something which you can write yourself to handle putting an \includesonly{thisfile} into the main file. <untested code> function! InsertIncludesOnly() let thisfile = expand('%:p:t') let mainfname = Tex_GetMainFileName(':p') exec 'split '.escape(mainfname, ' ') " remove a previous \\includesonly if its already there g/^\\includesonly/d _ " search for preamble if search('\\documentclass') == 0 return endif let includeline = '\includesonly{'.thisfile.'}' put=includeline " quit the :split'ted window q endfunction </untested code> HTH Srinath |