[Vim-latex-devel] Forward search in pdf on Mac OS X
Brought to you by:
srinathava,
tmaas
From: Michail V. <ma...@ia...> - 2006-12-26 02:11:43
|
Dear All, there is a PDFView program, that supports pdfsync. It is possible to use the feature from vim-latex. On \ls PDFView jumps to the correct page. Backward serach does not work, since vim lacks remote control capability on Mac. Just FUI. May be there are better solutions? I have the following ~/.vim/after/ftplugin/tex.vim ---------- function! Tex_ForwardSearchLaTeX() if &ft != 'tex' echo "calling Tex_ViewLaTeX from a non-tex file" return end let mainfnameRoot = fnamemodify(Tex_GetMainFileName(), ':p:r') let execString = 'silent! !osascript -e '''. \ "tell application \"PDFView\" \\\n". \ " display tex line ".line('.')." of file \"".mainfnameRoot.".pdf\" \\\n". \ "end tell". \ ''' &' call Tex_Debug("Tex_ForwardSearchLaTeX: execString = ".execString, "comp") execute execString if !has('gui_running') redraw! endif endfunction let g:Tex_ViewRule_pdf = 'PDFView' ---------- Sincerely, Michail |