Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory usw-pr-cvs1:/tmp/cvs-serv21021
Modified Files:
main.vim texmenuconf.vim
Log Message:
doing
let s:up_path = substitute(s:path, "latex-suite", "", "")
doesnt work because s:path could be of the form
s:path = '~/latex-suite/vimfiles/ftplugin/latex-suite'
so that the first latex-suite is removed instead of the second.
doing
let s:up_path = expand("<sfile>:p:h:h")
is much more robust.
Index: main.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** main.vim 7 Nov 2002 11:21:12 -0000 1.4
--- main.vim 8 Nov 2002 03:02:13 -0000 1.5
***************
*** 4,8 ****
" Email: sr...@fa...
" URL:
! " Last Change: czw lis 07 01:00 2002 C
"
" Help:
--- 4,8 ----
" Email: sr...@fa...
" URL:
! " Last Change: Thu Nov 07 06:00 PM 2002 PST
"
" Help:
***************
*** 51,60 ****
" these lines need to be outside the function.
let s:path = expand('<sfile>:p:h')
-
-
" set up personal defaults.
! let s:up_path = substitute(s:path, "latex-suite", "", "")
! if filereadable(s:up_path.'tex/texrc')
! exe "so ".s:up_path.'tex/texrc'
else
" set up global defaults.
--- 51,58 ----
" these lines need to be outside the function.
let s:path = expand('<sfile>:p:h')
" set up personal defaults.
! let s:up_path = expand('<sfile>:p:h:h')
! if filereadable(s:up_path.'/tex/texrc')
! exe "so ".s:up_path.'/tex/texrc'
else
" set up global defaults.
Index: texmenuconf.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texmenuconf.vim,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** texmenuconf.vim 7 Nov 2002 22:25:05 -0000 1.4
--- texmenuconf.vim 8 Nov 2002 03:02:13 -0000 1.5
***************
*** 5,9 ****
"
" Installation:
! " Last Change: czw lis 07 11:00 2002 C
" TODO:
"=============================================================================
--- 5,9 ----
"
" Installation:
! " Last Change: Thu Nov 07 06:00 PM 2002 PST
" TODO:
"=============================================================================
***************
*** 11,15 ****
" Paths, crucial for functions
let s:path = expand("<sfile>:p:h")
! let s:up_path = substitute(s:path, "latex-suite", "", "")
let s:mainmenuname = 'Te&X-Suite.'
--- 11,15 ----
" Paths, crucial for functions
let s:path = expand("<sfile>:p:h")
! let s:up_path = expand("<sfile>:p:h:h")
let s:mainmenuname = 'Te&X-Suite.'
***************
*** 71,76 ****
command! -nargs=0 Ttexrc :call Tex_texrc()
function! Tex_texrc()
! if filereadable(s:up_path.'tex/texrc')
! exec 'split '.s:up_path.'tex/texrc'
lcd
else
--- 71,77 ----
command! -nargs=0 Ttexrc :call Tex_texrc()
function! Tex_texrc()
! echomsg 's:path = '.s:path.', s:up_path = '.s:up_path
! if filereadable(s:up_path.'/tex/texrc')
! exec 'split '.s:up_path.'/tex/texrc'
lcd
else
|