0

I am using vim-latex to edit tex files and often type inline math formula by $xxxx$ and displaymath environment by \[xxxx\]. In the visual mode, Vim-latex provide shortcuts for them, i.e. `$ ,depending on characterwise or linewise selection.

How to implement auto close for them in the insert mode and let the cursor left between them? (I have used delimitMate for auto-closing, but it doesn't provide this type auto-closing.)

Yulong Ao
  • 1,199
  • 1
  • 14
  • 22

1 Answers1

0

I would use Snipmate or Ultisnips for that but you can do:

inoremap $$ $$<Left>
inoremap \[ \[\]<Left><Left>
romainl
  • 186,200
  • 21
  • 280
  • 313