> Based on Mike and Ted's examples, I'm trying my first "slightly
> intricate" (for me) mapping: I want a mapping to replace selected
> existing "(expression)" and "[expression]" in math mode by
> "\left(expression\right)" and "`\left[expression\right]",
> respecitvely.

First, don't knock yourself out. First, checkout

        :help latex-suite

Then, while editing a TeX file, type:

        ((

You should find that suddenly a

        \left( \right)<++>

appears and your cursor is in between the two of them. Type something 
and then hit Cntrl+J. Now your cursor has jumped to the <++> had has 
removed it.

Similarly, try typing:

        [[

again, Cntrl+J to jump to the <++> placeholder.

These are IMAP mappings. You can build more of them yourself, but the 
latex-suite includes lots of them. Within the mapping, things surrounded 
by <+ and +> serve as placeholders. So you can build templates with 
fields in them like <+name+>, <+date+>, etc., and then when you hit 
CNTRL+J, Vim will take you to the next field that needs to be filled in.


--Ted


-- 
Ted Pavlic <t...@tedpavlic.com>

   Please visit my ALS association page:
         http://web.alsa.org/goto/tedpavlic
   My family appreciates your support in the fight to defeat ALS.

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Vim-latex-devel mailing list
Vim-latex-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to