Re: [Vim-latex-devel] Advice on a mapping
Brought to you by:
srinathava,
tmaas
From: Julien C. <jul...@gm...> - 2009-01-09 13:05:46
|
Correction : vmap jus "zdi\right<C-O>2b\left<C-O>"zp<Esc> (forgot to call register z before pasting) Julien On Fri, Jan 9, 2009 at 2:00 PM, Julien Cornebise <jul...@gm...> wrote: > Dear all, > > 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. > > So far, I've come to the follownig visualmode macro, which, once I've > selected an inner block with, say, vib, adds the \left and \right. I > feel it is unelegant (not robust, not multiline, ugly <C-O>, etc etc), > but I can't figure a nicer way with my limited vim knowledge... > > vmap jus "zdi\right<C-O>2b\left<C-O>p<Esc> > > Any feedback appreciated ! (no emergency, though) > Thanks :) > > Julien > |