Update of /cvsroot/vim-latex/vimfiles/ftplugin/tex
In directory sc8-pr-cvs1:/tmp/cvs-serv31098
Modified Files:
texviewer.vim
Log Message:
Bug: <F9> for inserting references does not work in standard vim + cygwin
combination for windows.
Cause: Vim issues commands via the vimrun.exe program which calls the
cygwin bash shell in the following manner:
bash -c "command"
when we do ":!command" from within vim. With the current setup we issue
the command
!fgrep "\\label{" *.tex > c:/TEMP/VIe12.tmp
This gets converted into
bash -c "fgrep "\\label{" *.tex > c:/TEMP/VIe12.tmp"
by vimrun.exe. This causes all sorts of confusion.
Solution: Avoid issuing commands which contain double quotes otherwise
vimrun.exe screws up. Convert the grep commands to
grep '\label{' *.tex
from
grep "\\label{" *.tex
NOTE: the backslash escaping still needs to be done due to the outer
double quotes in the exec statement.
Index: texviewer.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/tex/texviewer.vim,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** texviewer.vim 28 May 2003 11:11:22 -0000 1.16
--- texviewer.vim 7 Jun 2003 10:39:24 -0000 1.17
***************
*** 68,72 ****
if exists("s:type") && s:type =~ 'ref'
! exe 'silent! grep! "\\label{'.s:prefix.'" '.s:search_directory.'*.tex'
call <SID>Tex_c_window_setup()
--- 68,72 ----
if exists("s:type") && s:type =~ 'ref'
! exe "silent! grep! '\\label{".s:prefix."' ".s:search_directory.'*.tex'
call <SID>Tex_c_window_setup()
***************
*** 76,84 ****
let bblfiles = <SID>Tex_FindBblFiles()
if bibfiles != ''
! exe 'silent! grepadd! "@.*{'.s:prefix.'" '.bibfiles
! let g:bbb = 'silent! grepadd! "@.*{'.s:prefix.'" '.bibfiles
endif
if bblfiles != ''
! exe 'silent! grepadd! "bibitem{'.s:prefix.'" '.bblfiles
endif
call <SID>Tex_c_window_setup()
--- 76,84 ----
let bblfiles = <SID>Tex_FindBblFiles()
if bibfiles != ''
! exe "silent! grepadd! '@.*{".s:prefix."' ".bibfiles
! let g:bbb = "silent! grepadd! '@.*{".s:prefix."' ".bibfiles
endif
if bblfiles != ''
! exe "silent! grepadd! 'bibitem{".s:prefix."' ".bblfiles
endif
call <SID>Tex_c_window_setup()
***************
*** 125,129 ****
endif
endif
! exe 'silent! grep! "\<' . s:word . '" '.s:search_directory.'*.tex'
call <SID>Tex_c_window_setup()
--- 125,129 ----
endif
endif
! exe "silent! grep! '\<".s:word."' ".s:search_directory.'*.tex'
call <SID>Tex_c_window_setup()
***************
*** 132,147 ****
elseif a:where == 'tex'
" Process :TLook command
! exe 'silent! grep! "'.a:what.'" '.s:search_directory.'*.tex'
call <SID>Tex_c_window_setup()
elseif a:where == 'bib'
" Process :TLookBib command
! exe 'silent! grep! "'.a:what.'" '.s:search_directory.'*.bib'
! exe 'silent! grepadd! "'.a:what.'" '.s:search_directory.'*.bbl'
call <SID>Tex_c_window_setup()
elseif a:where == 'all'
" Process :TLookAll command
! exe 'silent! grep! "'.a:what.'" '.s:search_directory.'*'
call <SID>Tex_c_window_setup()
--- 132,147 ----
elseif a:where == 'tex'
" Process :TLook command
! exe "silent! grep! '".a:what."' ".s:search_directory.'*.tex'
call <SID>Tex_c_window_setup()
elseif a:where == 'bib'
" Process :TLookBib command
! exe "silent! grep! '".a:what."' ".s:search_directory.'*.bib'
! exe "silent! grepadd! '".a:what."' ".s:search_directory.'*.bbl'
call <SID>Tex_c_window_setup()
elseif a:where == 'all'
" Process :TLookAll command
! exe "silent! grep! '".a:what."' ".s:search_directory.'*'
call <SID>Tex_c_window_setup()
|