[Vim-latex-devel] new dir for bibliography?
Brought to you by:
srinathava,
tmaas
From: Mikolaj M. <mi...@wp...> - 2003-04-08 08:45:30
|
Hello, I have got request to make possible looking for bibliography in other directory than directory of edited file. The best solution is to use grep but it needs such combination: elseif exists("s:type") && s:type =~ 'cite' let grep_prg = &grepprg set grepprg=grep\ -Hrn\ --include='*.bib'\ $*\ /dev/null exe 'silent! grep! "@.*{'.s:prefix.'" '.s:search_directory set grepprg=grep\ -Hrn\ --include='*.bbl'\ $*\ /dev/null exe 'silent! grepadd! "bibitem{'.s:prefix.'" '.s:search_directory set grepprg=grep\ -Hrn\ $*\ /dev/null exe 'silent! grepadd! "bibitem{'.s:prefix.'" %' let &grepprg = grep_prg call <SID>Tex_c_window_setup() With changing value of &grepprg. Alas, I don't know how to make it cross-platform. grep is easy to configure (GNU grep compatible grep tool as requirement and variable in texrc) but what about /dev/null? Without that lS doesn't work on terminal. Maybe something like that (example line): exe "set grepprg=".g:Tex_grepprg."\ -Hrn\ --include='*.bbl'\ $*".s:devnull And at the beginning: if has("unix") || has("mac_unix") || has("cygwin") let s:devnull = '\ /dev/null' else let s:devnull = '' endif How such compbination would work on other than Linux systems? m. |