[Vim-latex-cvs] vimfiles/ftplugin/latex-suite envmacros.vim,1.16,1.17
Brought to you by:
srinathava,
tmaas
|
From: <sri...@us...> - 2003-01-05 08:36:23
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv11460
Modified Files:
envmacros.vim
Log Message:
- Bug: <F5> was not buffer local mapping. <S-F5> was mapped only for the
first buffer which latex-suite is activated from.
Index: envmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** envmacros.vim 30 Dec 2002 11:12:02 -0000 1.16
--- envmacros.vim 5 Jan 2003 08:36:17 -0000 1.17
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 08:00 PM 2002 PST
! " Last Change: Mon Dec 30 03:00 AM 2002 PST
"
" Description: mappings/menus for environments.
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 08:00 PM 2002 PST
! " Last Change: Sun Jan 05 12:00 AM 2003 PST
"
" Description: mappings/menus for environments.
***************
*** 601,608 ****
let b:DoubleDollars = 0
! inoremap <F5> <C-r>=Tex_FastEnvironmentInsert()<cr>
! nnoremap <F5> i<C-r>=Tex_FastEnvironmentInsert()<cr>
! inoremap <buffer> <S-F5> <C-O>:call Tex_ChangeEnvironments()<CR>
! nnoremap <buffer> <S-F5> :call Tex_ChangeEnvironments()<CR>
" Tex_FastEnvironmentInsert: maps <F5> to prompt for env and insert it " {{{
--- 601,609 ----
let b:DoubleDollars = 0
! " Provide only <plug>s here. main.vim will create the actual maps.
! inoremap <silent> <Plug>Tex_FastEnvironmentInsert <C-r>=Tex_FastEnvironmentInsert()<cr>
! nnoremap <silent> <Plug>Tex_FastEnvironmentInsert i<C-r>=Tex_FastEnvironmentInsert()<cr>
! inoremap <silent> <Plug>Tex_FastEnvironmentChange <C-O>:call Tex_ChangeEnvironments()<CR>
! nnoremap <silent> <Plug>Tex_FastEnvironmentChange :call Tex_ChangeEnvironments()<CR>
" Tex_FastEnvironmentInsert: maps <F5> to prompt for env and insert it " {{{
***************
*** 669,673 ****
normal! 0"_D
return Tex_pack_one(pack)
! endfunction " }}}
" Tex_ChangeEnvironments: calls Change() to change the environment {{{
" Description:
--- 670,676 ----
normal! 0"_D
return Tex_pack_one(pack)
! endfunction
!
! " }}}
" Tex_ChangeEnvironments: calls Change() to change the environment {{{
" Description:
***************
*** 807,811 ****
while envname != ''
! exec 'inoremap <S-F'.i.'> <C-r>=Tex_PutEnvironment("'.envname.'")<CR>'
let i = i + 1
--- 810,814 ----
while envname != ''
! exec 'inoremap <silent> <buffer> <S-F'.i.'> <C-r>=Tex_PutEnvironment("'.envname.'")<CR>'
let i = i + 1
***************
*** 816,824 ****
endfunction " }}}
- call s:SetUpHotKeys()
-
endif
" }}}
" this statement has to be at the end.
--- 819,847 ----
endfunction " }}}
endif
" }}}
+ " Tex_SetFastEnvironmentMaps: function for setting up the <F5> and <S-F1>-<S-F4> keys {{{
+ " Description: This function is made public so it can be called by the
+ " SetTeXOptions() function in main.vim
+ function! Tex_SetFastEnvironmentMaps()
+ if g:Tex_PromptedEnvironments != ''
+ if !hasmapto('<Plug>Tex_FastEnvironmentInsert', 'i')
+ imap <silent> <buffer> <F5> <Plug>Tex_FastEnvironmentInsert
+ endif
+ if !hasmapto('<Plug>Tex_FastEnvironmentInsert', 'n')
+ nmap <silent> <buffer> <F5> <Plug>Tex_FastEnvironmentInsert
+ endif
+ if !hasmapto('<Plug>Tex_FastEnvironmentChange', 'i')
+ imap <silent> <buffer> <S-F5> <Plug>Tex_FastEnvironmentChange
+ endif
+ if !hasmapto('<Plug>Tex_FastEnvironmentChange', 'n')
+ nmap <silent> <buffer> <S-F5> <Plug>Tex_FastEnvironmentChange
+ endif
+ endif
+ if g:Tex_HotKeyMappings != ''
+ call s:SetUpHotKeys()
+ endif
+ endfunction " }}}
" this statement has to be at the end.
|