Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv1990
Modified Files:
envmacros.vim
Log Message:
- fixed bug ^[0-9][0-9]$ in ....
- Removed "loose ends" for handling $...$ and \(...\) commands
Index: envmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** envmacros.vim 14 Jan 2003 13:40:44 -0000 1.23
--- envmacros.vim 14 Jan 2003 23:56:52 -0000 1.24
***************
*** 531,535 ****
let inp = input(a:ask.s:common_env_prompt)
! if inp =~ '^[0-9][0-9]$'
let env = Tex_Strntok(g:Tex_PromptedEnvironments, ',', inp)
else
--- 531,535 ----
let inp = input(a:ask.s:common_env_prompt)
! if inp =~ '^[0-9]\+$'
let env = Tex_Strntok(g:Tex_PromptedEnvironments, ',', inp)
else
***************
*** 900,904 ****
let inp = input(a:ask.s:common_com_prompt)
! if inp =~ '^[0-9][0-9]$'
let com = Tex_Strntok(g:Tex_PromptedCommands, ',', inp)
else
--- 900,904 ----
let inp = input(a:ask.s:common_com_prompt)
! if inp =~ '^[0-9]\+$'
let com = Tex_Strntok(g:Tex_PromptedCommands, ',', inp)
else
***************
*** 996,1008 ****
let s:pos_com = line('.').' | normal! '.virtcol('.').'|'
! let com_line = searchpair('$\|\\(\|\\\k\{-}{', '', '$\|\\)\|}', 'b')
if com_line != 0
! if getline(com_line) !~ '\\\k\{-}{'
! let com_name = '$'
! else
! normal l
! let com_name = expand('<cword>')
! endif
endif
--- 996,1004 ----
let s:pos_com = line('.').' | normal! '.virtcol('.').'|'
! let com_line = searchpair('\\\k\{-}{', '', '}', 'b')
if com_line != 0
! normal l
! let com_name = expand('<cword>')
endif
***************
*** 1015,1023 ****
let s:change_com = PromptForCommand('Do you want to change it to (number or name)? ')
! if s:change_com == '$'
! call <SID>ChangeCommand('$')
! elseif s:change_com == '\\('
! call <SID>ChangeCommand('\\(')
! elseif s:change_com == ''
return 0
else
--- 1011,1015 ----
let s:change_com = PromptForCommand('Do you want to change it to (number or name)? ')
! if s:change_com == ''
return 0
else
***************
*** 1033,1046 ****
function! s:ChangeCommand(newcom)
! " For now no special treatment form math commands, left loose ends for
! " future.
! if a:newcom == '$'
! return 0
! elseif a:newcom == '\\('
! return 0
! else
! exe 'normal ct{'.a:newcom."\<Esc>"
! exe s:pos_com
! endif
endfunction
--- 1025,1030 ----
function! s:ChangeCommand(newcom)
! exe 'normal ct{'.a:newcom."\<Esc>"
! exe s:pos_com
endfunction
|