From 1100d97bc613507e2a47b2aa42109e7d3dc2b06f Mon Sep 17 00:00:00 2001 From: Srinath Avadhanula Date: Tue, 31 Dec 2002 19:15:37 +0000 Subject: [PATCH] . Follow the ed mappings philosophy here as well... . TODO: The meta mappings for brackets.vim might be removed by default in future revisions because they do really annoying things for european users. Only the will be provided. A new section in texrc will contain the maps which the user can customize... --- ftplugin/tex/brackets.vim | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/ftplugin/tex/brackets.vim b/ftplugin/tex/brackets.vim index 0198879..426d702 100755 --- a/ftplugin/tex/brackets.vim +++ b/ftplugin/tex/brackets.vim @@ -1,7 +1,7 @@ " ============================================================================== " Author: Carl Mueller " (incorporated into latex-suite by Srinath Avadhanula) -" Last Change: Sun Dec 29 11:00 PM 2002 PST +" Last Change: Tue Dec 31 11:00 AM 2002 PST " Description: " This ftplugin provides the following maps: " . encloses the previous character in \mathbf{} @@ -47,14 +47,24 @@ let b:did_brackets = 1 " ============================================================================== " {{{ -if !hasmapto('Tex_MathBF', 'i') && mapcheck('', 'i') == '' - inoremap =Tex_MathBF() +" Provide 'd mapping for easy user customization. +" +inoremap Tex_MathBF =Tex_MathBF() +inoremap Tex_MathCal =Tex_MathCal() +inoremap Tex_LeftRight =Tex_LeftRight() + +" Provide mappings only if the user hasn't provided a map already or if the +" target lhs doesn't have a mapping. +" TODO: These will be removed in future revisions. Alt mappings are a headache +" for European users... +if !hasmapto('Tex_MathBF', 'i') && mapcheck('', 'i') == '' + imap Tex_MathBF endif -if !hasmapto('Tex_MathCal', 'i') && mapcheck('', 'i') == '' - inoremap =Tex_MathCal() +if !hasmapto('Tex_MathCal', 'i') && mapcheck('', 'i') == '' + imap Tex_MathCal endif -if !hasmapto('Tex_LeftRight', 'i') && mapcheck('', 'i') == '' - inoremap =Tex_LeftRight() +if !hasmapto('Tex_LeftRight', 'i') && mapcheck('', 'i') == '' + imap Tex_LeftRight endif " }}}