[Vim-latex-devel] Advice on a mapping

2009-01-09 Thread Julien Cornebise
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

Re: [Vim-latex-devel] Advice on a mapping

2009-01-09 Thread Julien Cornebise
Correction : vmap jus zdi\rightC-O2b\leftC-OzpEsc (forgot to call register z before pasting) Julien On Fri, Jan 9, 2009 at 2:00 PM, Julien Cornebise julien.corneb...@gmail.com wrote: Dear all, Based on Mike and Ted's examples, I'm trying my first slightly intricate (for me) mapping: I want

Re: [Vim-latex-devel] Advice on a mapping

2009-01-09 Thread Julien Cornebise
Most sorry for polluting the list. I guess I should try my macro deeper before sending. The final (?) version is : vmap jus zdi\rightC-ObC-O2h\leftC-OzpEsc (my move commands to reach the left parenthesis were bogus) Sorry again ! If anybody has a good ref to recommand on using Vim macros

Re: [Vim-latex-devel] Advice on a mapping

2009-01-09 Thread Ted Pavlic
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,

Re: [Vim-latex-devel] Advice on a mapping

2009-01-09 Thread Julien Cornebise
:s/(\([^)]\+\))/\\left(\1\\right)/g That might be overkill (e.g., if you didn't want to fix *all* such expressions), but it would work for a single selected expression too. Thanks. Still, that would indeed fix *all* the expressions, even within the selection, not only the matched pair :