Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv12518
Modified Files:
envmacros.vim
Log Message:
- catch the LatexSuiteFileType event thrown by tex_latexSuite.vim to set up
buffer local maps for each tex file.
Index: envmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** envmacros.vim 15 Jan 2003 02:52:47 -0000 1.25
--- envmacros.vim 17 Jan 2003 09:18:15 -0000 1.26
***************
*** 4,8 ****
" Created: Tue Apr 23 08:00 PM 2002 PST
" CVS Header:
- " $Header$
" Description: mappings/menus for environments.
"=============================================================================
--- 4,7 ----
***************
*** 990,1018 ****
endfunction
" }}}
- " Tex_SetFastCommandMaps: function for setting up the <F7> keys {{{
- " Description: This function is made public so it can be called by the
- " SetTeXOptions() function in main.vim
- function! Tex_SetFastCommandMaps()
- if g:Tex_PromptedCommands != ''
- if !hasmapto('<Plug>Tex_FastCommandInsert', 'i')
- imap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
- endif
- if !hasmapto('<Plug>Tex_FastCommandInsert', 'n')
- nmap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
- endif
- if !hasmapto('<Plug>Tex_FastCommandChange', 'i')
- imap <silent> <buffer> <S-F7> <Plug>Tex_FastCommandChange
- endif
- if !hasmapto('<Plug>Tex_FastCommandChange', 'n')
- nmap <silent> <buffer> <S-F7> <Plug>Tex_FastCommandChange
- endif
- if !hasmapto('<Plug>Tex_FastCommandInsert', 'v')
- vmap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
- endif
- endif
- endfunction " }}}
endif
" }}}
--- 989,1040 ----
endfunction
" }}}
endif
+ " }}}
+ " Tex_SetFastCommandMaps: function for setting up the <F7> keys {{{
+ " Description: This function is made public so it can be called by the
+ " SetTeXOptions() function in main.vim
+ function! Tex_SetFastCommandMaps()
+ if g:Tex_PromptedCommands != ''
+ if !hasmapto('<Plug>Tex_FastCommandInsert', 'i')
+ imap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
+ endif
+ if !hasmapto('<Plug>Tex_FastCommandInsert', 'n')
+ nmap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
+ endif
+ if !hasmapto('<Plug>Tex_FastCommandChange', 'i')
+ imap <silent> <buffer> <S-F7> <Plug>Tex_FastCommandChange
+ endif
+ if !hasmapto('<Plug>Tex_FastCommandChange', 'n')
+ nmap <silent> <buffer> <S-F7> <Plug>Tex_FastCommandChange
+ endif
+ if !hasmapto('<Plug>Tex_FastCommandInsert', 'v')
+ vmap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
+ endif
+ endif
+ endfunction " }}}
+
+ " SetEnvMacrosOptions: sets mappings for buffers {{{
+ " " Description:
+ function! <SID>SetEnvMacrosOptions()
+ if exists('b:doneTexEnvMaps')
+ return
+ endif
+ let b:doneTexEnvMaps = 1
+ if g:Tex_PromptedEnvironments != '' || g:Tex_HotKeyMappings != ''
+ call Tex_SetFastEnvironmentMaps()
+ endif
+ if g:Tex_PromptedCommands != ''
+ call Tex_SetFastCommandMaps()
+ endif
+ endif
+ endfunction " }}}
+ " Catch the Filetype event so we set maps for each buffer {{{
+ augroup LatexSuite
+ augroup LatexSuite User LatexSuiteFileType
+ \ | call Tex_Debug('envmacros.vim: catching LatexSuiteFileType')
+ \ | call s:SetEnvMacrosOptions()
+ augroup END
" }}}
|