Re: [Vim-latex-devel] Advice on a mapping
Brought to you by:
srinathava,
tmaas
From: Ted P. <te...@te...> - 2009-01-09 14:47:08
|
> 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 <te...@te...> Please visit my ALS association page: http://web.alsa.org/goto/tedpavlic My family appreciates your support in the fight to defeat ALS. |