[Vim-latex-cvs] vimfiles/ftplugin/tex texviewer.vim,1.23,1.24
Brought to you by:
srinathava,
tmaas
|
From: <sri...@us...> - 2003-06-17 16:23:00
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/tex
In directory sc8-pr-cvs1:/tmp/cvs-serv31378
Modified Files:
texviewer.vim
Log Message:
New: Also support '\psfig{figure=' for completion.
Index: texviewer.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/tex/texviewer.vim,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** texviewer.vim 17 Jun 2003 09:35:25 -0000 1.23
--- texviewer.vim 17 Jun 2003 16:22:57 -0000 1.24
***************
*** 6,9 ****
--- 6,10 ----
" License: Vim Charityware License
" Part of vim-latexSuite: http://vim-latex.sourceforge.net
+ " CVS: $Id$
" ============================================================================
***************
*** 72,83 ****
let s:prefix = matchstr(s:curline, '.*{\zs.\{-}$')
" a command is of the type
! " \includegraphics[0.8\columnwidth]{}
" Thus
! " s:curline = '\includegraphics[0.8\columnwidth]{'
" (with possibly some junk before \includegraphics)
" from which we need to extract
! " s:type = 'includegraphics'
! " s:typeoption = '[0.8\columnwidth]'
! let pattern = '.*\\\(\w\{-}\)\(\[.\{-}\]\)\?{$'
let s:type = substitute(s:curline, pattern, '\1', 'e')
let s:typeoption = substitute(s:curline, pattern, '\2', 'e')
--- 73,84 ----
let s:prefix = matchstr(s:curline, '.*{\zs.\{-}$')
" a command is of the type
! " \psfig[option=value]{figure=}
" Thus
! " s:curline = '\psfig[option=value]{figure='
" (with possibly some junk before \includegraphics)
" from which we need to extract
! " s:type = 'psfig'
! " s:typeoption = '[option=value]'
! let pattern = '.*\\\(\w\{-}\)\(\[.\{-}\]\)\?{\(\a\+=\)\?$'
let s:type = substitute(s:curline, pattern, '\1', 'e')
let s:typeoption = substitute(s:curline, pattern, '\2', 'e')
***************
*** 87,91 ****
call Tex_Debug("silent! grep! '\\label{".s:prefix."' ".s:search_directory.'*.tex', 'view')
exe "silent! grep! '\\label{".s:prefix."' ".s:search_directory.'*.tex'
!
elseif exists("s:type") && s:type =~ 'cite'
--- 88,92 ----
call Tex_Debug("silent! grep! '\\label{".s:prefix."' ".s:search_directory.'*.tex', 'view')
exe "silent! grep! '\\label{".s:prefix."' ".s:search_directory.'*.tex'
! call <SID>Tex_c_window_setup()
elseif exists("s:type") && s:type =~ 'cite'
***************
*** 110,114 ****
endif
! elseif exists("s:type") && s:type =~ 'includegraphics'
let s:storehidefiles = g:explHideFiles
let g:explHideFiles = '^\.,\.tex$,\.bib$,\.bbl$,\.zip$,\.gz$'
--- 111,115 ----
endif
! elseif exists("s:type") && (s:type =~ 'includegraphics' || s:type == 'psfig')
let s:storehidefiles = g:explHideFiles
let g:explHideFiles = '^\.,\.tex$,\.bib$,\.bbl$,\.zip$,\.gz$'
***************
*** 179,183 ****
"
function! s:Tex_c_window_setup(...)
!
cclose
exe 'copen '. g:Tex_ViewerCwindowHeight
--- 180,184 ----
"
function! s:Tex_c_window_setup(...)
! call Tex_Debug('+Tex_c_window_setup', 'view')
cclose
exe 'copen '. g:Tex_ViewerCwindowHeight
***************
*** 259,262 ****
--- 260,264 ----
"
function! s:UpdateViewerWindow()
+ call Tex_Debug('+UpdateViewerWindow', 'view')
let viewfile = matchstr(getline('.'), '^\f*\ze|\d')
|